#include using namespace std; using int64 = long long; int main() { int64 a,b; cin >> a >> b; if (a==-1) cout << 2 << endl; else if (b==0) cout << 1 << endl; else cout << -1 << endl; }