#000554

Basics Trigonometry

Little Ilija began to learn trigonometry on school math class . In order to determine the material, he began to play with the basic identities (sine, cosine, tangent and cotangent), so that each identity has its own command.
- 1 for the sine
- 2 for the cosine
- 3 for the tangent
- 4 for the cotangent
Your task is to print the value of expression of these commands.


InputThe first line of the standard input contains the the X, which represents a sharp angle. In the next row, there is given expression, which consists of the above given commands and the operations of addition and subtraction (50 maximum operations).

Output To the standard output write value of a given expression, which will be to two decimal places.

Input:
30
4-1

Output:
1.23

Input:
45
3-2+1+1+2-4

Output:
1.41



The explanation for first example: There is given an angle of 30 degrees and the expression of 4-1. For an angle of 30 degrees ctg = 1.73, and sin = 0.50. Therefore, the expression (4-1) = (1.73-0.50) = 1.23

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.