// Arup Guha
// 6/5/2023
// Alternate Solution 1 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) {
        if (y > 0)  ans = 1;
        else        ans = 4;
    }

    // Left side.
    else {
        if (y > 0)  ans = 2;
        else        ans = 3;
    }

    // Ta da!
    cout << ans << endl;

    return 0;
}
