#include using namespace std; int main(void){ int G_x, G_y; cin >> G_x >> G_y; if(G_x == G_y || G_x == -G_y){cout << 1 << endl;} else{cout << 2 << endl;} }