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