N=int(input()) if N==1 or N==4: exit(print(-1)) if N%2==0 and (N//2%2==1): print(-1) else: print(1)