n = int(input()) while n % 4 == 0: n //= 4 print(-1 if n % 2 == 0 else 1)