n = int(input())
ans = 1
if n == 1 or n == 2 or n == 4:
  ans = -1
if n % 4 == 2:
  ans = -1
print(ans)