Time Limit : sec, Memory Limit : KB
English / Japanese  

Floor

 

The floor of Dr. Hideyo's house is covered with square tiles. Dr. Hideyo, who has an interest in art, decides to paint the tiles with red, yellow, and blue paint. To begin, he selects one appropriate tile in the room and paint it with the following method.

  • Change the color of the tile to be painted in the following order: red (number 1 in the figure), yellow (number 2 in the figure), blue (number 3 in the figure), and after blue, start with red again.
  • Add a square next to the already colored area and color it. The combined area should be a rectangle. Add squares in the following order: east, north, west, south, and after south, start from the east again (in the figure, north is up and east is to the right).



What color are the tiles in the east-west direction $x$ and in the north-south direction $y$ moved from the first tile painted red? Let the east direction be the positive direction of $x$ and the north direction be the positive direction of $y$.

Write a program that takes $x$ and $y$ as input and outputs the color of the tile.

Input

The input is given in the following form.

$x$ $y$

$x$ and $y$ ($-10^6 \leq x,y \leq 10^6$) are given in a line.

Output

Output 1 when the tile color is red, 2 when the tile color is yellow, and 3 when the tile color is blue on one line.

Sample Input and Output

Sample Input 1

0 0

Sample Output 1

1

Sample Input 2

-4 5

Sample Output 2

2

Sample Input 3

8 -14

Sample Output 3

3