#include using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); ll a, b; cin >> a >> b; if (b == 0) cout << "1\n"; else if (a >= 0) cout << "-1\n"; else if (a == -1) cout << "2\n"; else cout << "-1\n"; }