#include using namespace std; using ll = long long; const int iinf = 1e9; const ll inf = 1e18; template ostream& operator<<(ostream &o, vector v) { for (int i = 0; i < v.size(); i++) o << v[i] << (i+1sync_with_stdio(false); int gx, gy; cin >> gx >> gy; if (gx == 0 || gy == 0 || gx == gy || gx == -gy) { cout << 1 << endl; } else { cout << 2 << endl; } }