sn = input() n = int(sn) if n < 2: print(-1) else: l = len(sn) ln = int(sn[l-1]) if ln % 2 == 0: if (n//2) % 2 == 1: print(-1) else: print(1) else: print(1)