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: import sys, re
  from collections import deque, defaultdict, Counter
  from math import (
      ceil,
      sqrt,
      hypot,
      factorial,
      pi,
      sin,
      cos,
      tan,
      asin,
      acos,
      atan,
      radians,
      degrees,
      log2,
  )
  from itertools import (
      accumulate,
      permutations,
      combinations,
      combinations_with_replacement,
      product,
      groupby,
  )
  from operator import itemgetter, mul
  from copy import deepcopy
  from string import ascii_lowercase, ascii_uppercase, digits
  from bisect import bisect, bisect_left, insort, insort_left
  from fractions import gcd
  from heapq import heappush, heappop
  from functools import reduce
  
  
  def input():
      return sys.stdin.readline().strip()
  
  
  def INT():
      return int(input())
  
  
  def MAP():
      return map(int, input().split())
  
  
  def LIST():
      return list(map(int, input().split()))
  
  
  def ZIP(n):
      return zip(*(MAP() for _ in range(n)))
  
  
  sys.setrecursionlimit(10**9)
  INF = float("inf")
  mod = 10**9 + 7
  # from decimal import *
  
  
  def ketawa(x):
      return sum(map(int, list(str(x))))
  
  
  N = INT()
  
  ans = INF
  for a in range(1, N // 2 + 1):
      b = N - a
      ans = min(ans, ketawa(a) + ketawa(b))
  print(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"}]