def solve(n): if n == 4: return -1; if n == 1: return -1; if n % 2 == 1: return 1; if n % 4 == 0: return 1; return -1 print(solve(int(input())))