N = int(input()) cnt = 0 import math for i in range(1,N): p = (N+i)*(N-i) t = math.ceil(p) m = math.floor(p) if p == t == m: cnt += 1 print(cnt)