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

USU Junior Championship March'2005

About     Problems     Submit solution     Judge status     Standings
Contest is over

M. Construction

Time limit: 1.0 second
Memory limit: 64 MB
A lifting crane broke down. The constructors are to lift down a barrel with and old cement. The barrel is to end up n meters to the left and m meters down from the place where it was. To get a barrel down one can build a ramp of some amount of wooden planks so, that
  • both ends of each plank would have integer coordinates;
  • one end is always lower than the other one;
  • the lowest end of each plank is not to the right from the upper one.
You may assume that barrel doesn’t jump during rolling down, i.e. direction of it’s velocity changes in a moment and value of velocity keeps unchanged at the turns of a planks. Acceleration of gravity assumed to be equal to 10. You should neglect rotation of the barrel and friction between barrel and ramp. You are to find a minimal time to get a barrel down.

Input

Input contains two integers n and m (1 ≤ n, m ≤ 50).

Output

Output should contain minimal time in seconds which a barrel would need to roll down on the described construction of wooden planks accurate within 10-3.

Sample

inputoutput
2 2
0.8614
Problem Author: Den Raskovalov (text by Aleksandr Bikbaev)
Problem Source: USU Junior Championship March'2005
To submit the solution for this problem go to the Problem set: 1359. Construction