def solve(): ans = 1 N = int(input()) if N%4==2: ans = -1 return ans print(solve())