407050: GYM102697 021 Hovercraft

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

021. Hovercrafttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

While testing your hovercraft for Science Olympiad, the hovercraft flew over a pile of boxes in your basement and traveled a total distance of n feet. Given that the boxes are in a rectangular shape, and that the hovercraft took off and landed at opposite corners of the pile of boxes, calculate how far you will have to walk to pick up the hovercraft. You are also given the length of one side of the pile of boxes.

Input

The first line of input contains a single positive integer n: how far the hovercraft traveled in feet. The second line of input contains a single positive integer m: the length of one side of the file of boxes.

Output

Output a single positive integer w: how far you will have to walk to retrieve the hovercraft.

ExamplesInput
10
6
Output
14.0
Input
14
13
Output
18.196152422706632

加入题单

算法标签: