ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1149. Sinus Dances

Time limit: 1.0 second
Memory limit: 64 MB
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

Line containing SN

Sample

inputoutput
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