Problems
Polygonal chain - 2
Polygonal chain - 2
Find the number of different polygonal chains of minimum length, connecting the origin with the point M(x,y) so that its neighboring links are perpendicular to each other and have a unit length.
Input
Two integers - the coordinates of point М(x,y), -20 ≤ x,y ≤ 20.
Output
Print the number of possible polygonal chains of minimum length.
Input example #1
2 2
Output example #1
2