#include "bits/stdc++.h" using namespace std; #define Would #define you const int INF = 999999999; const int MOD = 1e9 + 7; const double pi = 3.141592653589793238; int main() { int a, b, ans; cin >> a >> b; if (a == b) { ans = 0; } else if (b == 0) { ans = 1; } else if (a == 0) { ans = 2; } else if (a == -b) { ans = 3; } else { ans = -1; } cout << ans << endl; }