import sys input = sys.stdin.readline from random import randint N,X,Y=map(int,input().split()) if X==Y: print(0) exit() if Y%2==0: print(-1) exit() def f(i,x): return (x*(1<