N = int(input()) if N % 2 != 0: print(-1 if N == 1 else 1) elif N % 4 == 0: print(-1 if N == 4 else 1) else: print(-1)