#include using namespace std; int main() { int gx, gy; cin >> gx >> gy; if (abs(gx) == abs(gy)){ cout << 1 << endl; } else { cout << 2 << endl; } }