import std; int calc(int a, int b) { if (b == 0) return 1; if (a == -1) return 2; return -1; } void main() { int a, b; scan(a, b); writeln(calc(a, b)); } void scan(T...)(ref T a) { string[] ss = readln.split; foreach (i, t; T) a[i] = ss[i].to!t; } T read(T=string)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readints = reads!int;