#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int x,y; cin>>x>>y; cout<<(x==y?0:y==0?1:x==0?2:-1)<<"\n"s; }