Let An = sin(1–sin(2+sin(3–sin(4+…sin(n))…)
Let Sn = (…(A1+n)A2+n–1)A3+…+2)An+1
For given N print SN
Input
One integer N. 1 ≤ N ≤ 200
Output
Sample
input | output |
---|
3 | ((sin(1)+3)sin(1–sin(2))+2)sin(1–sin(2+sin(3)))+1 |
Problem Author: Vladimir Gladkov
Problem Source: Ural Collegiate Programming Contest, April 2001, Perm, Test Round