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