Problem1287--Spiral Polyline

1287: Spiral Polyline

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

As shown in the spiral polyline passes through the plane all the hour exactly once.
For the whole point (x, y), we define its distance from the origin to dis (x, y) is the length of the helical segment from the origin to (x, y).

For example DIS (0, 1) =3, DIS (-2,-1) =9 Given the coordinates of the whole point (x, y), can you calculate the dis (x, y)?

Input

two integers represent one coordinate:x , y ;

(-1000000000 <= X, Y <= 1000000000 )

Output

one integers as the answer of dis (x, y).

Sample Input Copy

0 1

Sample Output Copy

3

Source/Category