n=int(input()) n=n%4 if(n==2): print(-1) else: print(1)