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