n = int(input()) if n == 1: print(-1) elif n % 2 == 1: print(1) else: sq = int((n + 1) ** 0.5) if sq ** 2 == n + 1: print(1) else: print(-1)