#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=144499999999994; ll mod=998244353; int main(){ ll a,b; cin >> a >> b; if (a==-1||b==0) { if (b!=0) { cout << 2 << endl; }else{ cout << 1 << endl; } }else{ cout << -1 << endl; } }