output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: def hantei(p, q):
    ANS = divmod(p, q)
    if ANS[0] == ANS[1]:
      return q
    else 0
    
  N = int(input())
  ans = [hantei(N, r) for r in range(N) if hantei(N, r) != 0]
  print(sum(ans))
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."}]