N = int(input()) f = True if N== 1: f = False if N == 4: f = False if N % 4 == 2: f = False if f: print(1) else: print(-1)