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())
  
  
  x = n - 2
  y = n - x
  
  if n < 10:
      print(n)
  if n = 10:
      print(1)
  else:
      resulty, resultx = 0, 0
  
      while(x > 0):
          resultx += x % 10
          x = x // 10
  
      while(y > 0):
          resulty += y % 10
          y = y // 10
  
      #print(resulty+resultx)
      z = n//2
  
      result = 0
      while(z > 0):
          result += z % 10
          z = z // 10
  
      if result*2 < resulty+resultx:
          print(result*2)
      else:
          print(resulty+resultx)
  
  
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"}]