Var
x, y: real;
N: integer;
begin
read(x,y);
if y >= 0 then
if x >= 0 then
if (x <= 1) and (y <= 1) then<br> N := 3
else
N := 5
else
if (x >= -1) and (y <= 1) then<br> N := 1
else
N := 5
else
if x >= 0 then
if y - x + 1 >= 0 then
N := 4
else
N := 5
else
if sqr(x) + sqr(y) - 1 <= 0 then<br> N := 2
else
N := 5;
write(N)
end.