input() print(1 if sum(i*k for i, k in enumerate((input()).split(" "))) % 2 else -1)