N = int(input()) print(1 if (N%2 or N%4==0) and N not in [1, 4] else -1)