#include using namespace std; int main() { int x,y; cin >> x >> y; if(abs(x)==abs(y)) cout << "1\n"; else cout << "2\n"; }