#include using namespace std; int x,y; int main(){ cin>>x>>y; int t=-1; if(!x||x==-y) t=2; if(!y) t=1; if(x==y) t=0; cout<