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