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