#include #include #include #include #include using namespace std; int X, Y, ans; int main(){ cin >> X >> Y; if(X == Y){ ans = 0;} else if(Y == 0){ ans = 1;} else if(X == 0){ ans = 2;} else {ans = -1;} cout << ans << endl; }