n = int(input()) print(-1 if n % 4 == 2 or n < 3 else 1)