output_description: Print the minimum possible value of "the sum of the digits of A" plus "the sum
  of the digits of B".
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: n = int(input())
  
  wa_min = n
  for i in range(1, n + 1):
      n1 = n - i
      n2 = i
      wa1 = 0
      wa2 = 0
      while n1 > 0:
          mod = n1 % 10
          wa1 += mod
          n1 = n1 // 10
      while n2 > 0:
          mod2 = n2 % 10
          wa2 += mod2
          n2 = n2 // 10
      if (wa1 + wa2) < wa_min:
          wa_min = wa1 + wa2
      if i == n - i:
          break
  print(wa_min)
  
problem_description: Statement
  
  Takahashi has two positive integers A and B.
  
  It is known that A plus B equals N. Find the minimum possible value of "the
  sum of the digits of A" plus "the sum of the digits of B" (in base 10).
samples: [{"input": "15", "output": "6\n    \n\nWhen A=2 and B=13, the sums of their digits are 2 and 4, which minimizes the\nvalue in question.\n\n* * *"}, {"input": "100000", "output": "10"}]