#include #include #include #include #include #include using namespace std; int main(){ int X,Y; cin >> X >> Y; if(X==Y){ cout << "0\n"; return 0; } if(X*-1==Y){ cout<<"3\n"; return 0; } if(X==Y*-1){ cout << "2\n"; return 0; } if(X!=0&&Y!=0){ cout << "-1\n"; return 0; } if(Y!=0) cout << "2\n"; else cout << "1\n"; return 0; }