# A + B == p && A - B == q
# 2 * A == p + q

n = int(input())
if n != 1 and n != 4 and (n % 2 == 1 or n % 4 == 0):
    print(1)
else:
    print(-1)