Start 2024-05-18 14:20:00

20240518下午基础班1

End 2024-05-18 18:00:00
Contest is over.
Now 2026-11-19 00:33:41

B. 复杂算式

Description

已知f(x,n)=\sqrt{n+\sqrt{(n-1)+\sqrt{(n-2)+\sqrt{...+2+\sqrt{1+x}}}}} ,输入x和n的值,计算f(x,n)的值。

Input

输入一个双精度浮点数x和一个整数n(1\le n<100)。

Output

f(x,n)的值,保留小数点后小数两位。

Examples

Input

3.6 10

Output

3.68

Submit

Login

Signup
Time Limit 1 second
Memory Limit 128 MB
Submit