n = int(input()) if n <= 4: if n in (1, 2, 4): print('-1') else: print('1') else: if (n + 2) % 4 == 0: print('-1') else: print('1')