import sys import math def input() : return sys.stdin.readline().strip() def INT() : return int(input()) def MAP() : return map(int,input().split()) def LIST() : return list(MAP()) N=int(input()) if N==0 or N==1 or N==4: print(-1) exit() if N%4==2: print(-1) else: print(1)