using System;
using System.Numerics;
public class Program
{
public static void Main()
double x = double.Parse(Console.ReadLine());
double y = double.Parse(Console.ReadLine());
int location = 0;
if (x == 0 && y != 0)
location = 5;
}
if (y == 0 && x !=0 )
location = 6;
if (x > 0 && y > 0)
location = 1;
if (x < 0 && y > 0)
location = 2;
if (x < 0 && y < 0)
location = 3;
if (x > 0 && y < 0)
location = 4;
Console.WriteLine(location);