N=int(input()) X=0 M=N while M%2==0: X+=1 M//=2 if X==1 or N==1 or N==4: print(-1) else: print(1)