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