import sys n = int(input()) if n == 1 or n == 4: print(-1) sys.exit(0) print(-1 if n % 4 == 2 else 1)