x,y=gets.split.map{|e| e.to_i} if x==y puts 0 elsif x==0 puts 2 elsif y==0 puts 1 elsif x.abs==y.abs puts 3 else puts -1 end