// Arup Guha
// 6/5/2023
// Alternate Solution 2 to Kattis Problem Quadrant Selection to illustrate
// if-else if-else construction and &&

using namespace std;
#include <iostream>

int main() {

    int x, y, ans=0;
    cin >> x >> y;

    // Right side.
    if (x > 0 && y > 0)     ans = 1;
    else if (x>0 && y<0)    ans = 4;
    else if (x<0 && y>0)    ans = 2;
    else                    ans = 3;

    // Ta da!
    cout << ans << endl;

    return 0;
}
