N=int(input()) if N<=10: F=(N in {3,5,7,8,9}) else: F=(N%4 != 2) if F: print(1) else: print(-1)