n = int(input()) n %= 4 if n == 2: print(-1) else: print(1)