output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: m = int(input())
  pf = {m: 1}
  a = [0]
  for i in range(2, int(m**0.5) + 1):
      pf[i] = pf.get(i, 0) + 1
      if i != m // i:
          pf[m // i] = pf.get(m // i, 0) + 1
  for i in pf:
      if m // (i - 1) == m % (i - 1):
          a.append(a[-1] + i - 1)
  print(a[-1])
  
problem_description: Statement
  
  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.
samples: [{"input": "8", "output": "10\n    \n\nThere are two favorite numbers: 3 and 7. Print the sum of these, 10.\n\n* * *"}, {"input": "1000000000000", "output": "2499686339916\n    \n\nWatch out for overflow."}]