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