N=int(input()) if N%4==2 or N in (1,4): ans=-1 else: ans=1 print(ans)