import math n,m=map(int,input().split()) if n <= m or (n % 2 == 0 and n // 2 <= m): print(1) else: print(-1)