Snuke received a positive integer N from Takahashi. A positive integer m is called a _favorite number_ when the following condition is satisfied:    * The quotient and remainder of N divided by m are equal, that is, \lfloor \frac{N}{m} \rfloor = N \bmod m holds.  Find all favorite numbers and print the sum of those.
count = 0
n = int(input())
for i in range(1, n):
  if n % i == n // i:
    count += 1
print(count)
count = 0
n = int(input())
for m in range(1, int(n**0.5)+1):
  if n % m == 0 and m < (n//m - 1):
      count += n//m-1
print(count)