x = int(input()) print(1 if x % 4 != 2 and x > 1 else -1)