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