N, X, Y = map(int, input().split()) if Y%2 == 0: if X == Y: print(0) else: print(-1) exit() ans = [N] pre = -1 for i in reversed(range(N)): if 1<