Problems
Sum of sines 2
Sum of sines 2
For the given positive integer $n$ and real number $x$ find the sum
$$sin\:x + sin\:x^2 + \dots + sin\:x^n$$
\InputFile
Two numbers: one integer $n\:(n \le 1000)$ and one real number $x\:(|x| \le 1000)$.
\OutputFile
Print the value of the sum with $6$ decimal digits.
Input example #1
3 1
Output example #1
2.524413