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