n = int(input()) print(1 if (n%2 and n > 1) or (n%4==0 and n > 4) else -1)