Sum of sines 2#11443

Sum of sines 2

1 second
128 megabytes
Easy

For the given positive integer and real number find the sum

\sin\:x + \sin\:x^2 + \dots + \sin\:x^n

Input

Two numbers: one natural number n\:(n \le 1000) and one real number x\:(|x| \le 1000).

Output

Print the value of the sum with decimal digits.

Examples

Example 1

Loading
Loading