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())
  A = 1
  B = 1
  listA = []
  listB = []
  for i in range(N):
      # N = A + B
      A = i + 1
      B = N - i - 1
      listA.append(A)
      listB.append(B)
  ans = []
  for i in range(N - 1):
      A = str(listA[i])
      if len(str(A)) == 1:
          sumA = int(A)
      elif len(str(A)) == 2:
          sumA = int(A[0]) + int(A[1])
      elif len(str(A)) == 3:
          sumA = int(A[0]) + int(A[1]) + int(A[2])
      elif len(str(A)) == 4:
          sumA = int(A[0]) + int(A[1]) + int(A[2]) + int(A[3])
      elif len(str(A)) == 5:
          sumA = int(A[0]) + int(A[1]) + int(A[2]) + int(A[3]) + int(A[4])
      elif len(str(A)) == 6:
          sumA = int(A[0]) + int(A[1]) + int(A[2]) + int(A[3]) + int(A[4]) + int(A[5])
  
      B = str(listB[i])
      if len(str(B)) == 1:
          sumB = int(B)
      elif len(str(B)) == 2:
          sumB = int(B[0]) + int(B[1])
      elif len(str(B)) == 3:
          sumB = int(B[0]) + int(B[1]) + int(B[2])
      elif len(str(B)) == 4:
          sumB = int(B[0]) + int(B[1]) + int(B[2]) + int(B[3])
      elif len(str(B)) == 5:
          sumB = int(B[0]) + int(B[1]) + int(B[2]) + int(B[3]) + int(B[4])
      elif len(str(B)) == 6:
          sumB = int(B[0]) + int(B[1]) + int(B[2]) + int(B[3]) + int(B[4]) + int(B[5])
  
      ans.append(sumA + sumB)
  
  print(min(ans))
  
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"}]