CodeEff/ECCO huggingface dataset:
# Original solution
a,b=list(map(int,input().split()))

cnt=0
if (a>0 and b<0) or (a<0 and b>0):
  ans="Zero"
elif a==0 or b==0:
  ans="Zero"
elif a>0 and b>0:
  ans="Positive"
elif a<0 and b<0:
  a,b=a*-1,b*-1
  for i in range(b,a+1):
    cnt+=1
  if cnt%2==0:
    ans="Positive"
  else:
    ans="Negative"
    
print(ans)

# Optimized solution
a,b=list(map(int,input().split()))

if (a>0 and b<0) or (a<0 and b>0):
  ans="Zero"
elif a==0 or b==0:
  ans="Zero"
elif a>0 and b>0:
  ans="Positive"
elif a<0 and b<0:
  if (a%2==0 and b%2==0) or (a%2!=0 and b%2!=0):
    ans="Negative"
  else:
    ans="Positive"
    
print(ans)
# Original solution
#!/usr/bin/python
# -*- coding: utf-8 -*-

n=int(input())
maxv=n
for a in range(1,n):
  b=n-a
  if a>b: break
  sa=sum([int(x) for x in str(a)])
  sb=sum([int(x) for x in str(b)])
  maxv=min(maxv, sa+sb)
print(maxv)

# Optimized solution
num = int(eval(input()))

def digitSum(n):
    s = 0
    while n!=0:
        s += n%10
        n //=10
    return s


arr = []
rev_arr = []
for n in range(1,num):
    arr.append(n)
rev_arr = arr[::-1]

final_arr = []
for n in range(num-1):
    val = digitSum(arr[n]) + digitSum(rev_arr[n])
    final_arr.append(val)

print((min(final_arr)))
# Original solution
n=int(eval(input()))
while n%10==0 and n!=10:
  n=n//10
if n==10:
  print((10))
else:
  s=str(n)
  ans=0
  for i in range(len(s)):
    ans+=int(s[i])
  print(ans)

# Optimized solution
import sys
n=int(eval(input()))
ans=0
flag=0
while n%10==0:
  n=n//10
if n==1:
  print((10))
  sys.exit()
s=str(n)
for i in range(len(s)):
  ans+=int(s[i])
print(ans)
# Original solution
# AGC025A - Digits Sum
def main():
    n = int(eval(input()))
    ans = float("inf")
    for i in range(1, n // 2 + 1):
        j = n - i
        ds = sum(map(int, str(i))) + sum(map(int, str(j)))  # digits sum
        ans = min(ans, ds)
    print(ans)


if __name__ == "__main__":
    main()

# Optimized solution
# AGC025A - Digits Sum
# Better ver.
def main():
    n = int(eval(input()))
    ans = sum(map(int, str(n)))  # ds: digit sum
    print((ans if ans != 1 else 10))


if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))

def f(k):
    s = str(k)
    n = len(s)
    ans = 0
    for i in range(n):
        ans += int(s[i])
    return ans

ans = float("INF")
for i in range(1, N):
    j = N-i
    t = f(i) + f(j)
    ans = min(ans, t)

print(ans)

# Optimized solution
N = int(eval(input()))

def f(n):
    ans = 0
    for s in str(n):
        ans += int(s)
    return ans

ans = float("INF")
for i in range(1, N):
    j = N-i
    ans = min(ans, f(i) + f(j))
    
print(ans)
# Original solution
n=int(eval(input()))
ans=10e5
for a in range(1,n//2+1):
    b=n-a
    ans=min(ans,sum([int(i) for i in str(a)])+sum([int(i) for i in str(b)]))
    ans=min(ans,sum([int(i) for i in str(a)])+sum([int(i) for i in str(b)]))
print((int(ans)))

# Optimized solution
n=int(eval(input()))
ans=10e5
for a in range(1,n//2+1):
    b=n-a
    ans=min(ans,sum([int(i) for i in str(a)])+sum([int(i) for i in str(b)]))
print((int(ans)))
# Original solution
n=int(eval(input()))
ans=10e5
for a in range(1,n//2+1):
    b=n-a
    ans=min(ans,sum([int(i) for i in str(a)])+sum([int(i) for i in str(b)]))
print((int(ans)))


# Optimized solution
n=int(eval(input()))
ans=10e5
for a in range(1,n//2+1):
    b=n-a
    ans=min(ans,sum(map(int,str(a)))+sum(map(int,str(b))))
print((int(ans)))
# Original solution
N=int(eval(input()))
def f(x):
  s=0
  while x!=0:
    s+=x%10
    x//=10
  return(s)
minn=50
for i in range(1,N):
  minn=min(f(i)+f(N-i),minn)
print(minn)

# Optimized solution
N=int(eval(input()))
def f(x):
  s=0
  while x!=0:
    s+=x%10
    x//=10
  return(s)
minn=50
for i in range(1,N//2+1):
  minn=min(f(i)+f(N-i),minn)
print(minn)
# Original solution
a = int(eval(input()))
min = 99999999999999
if a % 10 == 0:
    print((10))
else:
    for i in range(1, a):
        c = 0
        for j in range(i, a):
            if i + j == a:
                x = i
                y = j
                while (x > 0):
                    c += x % 10
                    x = x // 10
                while (y > 0):
                    c += y % 10
                    y = y // 10
                if min > c:
                    min = c
    print(min)

# Optimized solution
a = int(eval(input()))
if a % 10 == 0:
    print((10))
else:
    c = 0
    while (a > 0):
        c += a % 10
        a = a//10
    print(c)
# Original solution
def main():
    N = int(eval(input()))

    total = float('inf')
    for a in range(1, N):
        b = N - a
        n = 0
        while a > 0:
            n += a % 10
            a //= 10
        while b > 0:
            n += b % 10
            b //= 10
        total = min(total, n)

    print(total)

main()


# Optimized solution
def main():
    N = int(eval(input()))

    ans = 0
    while N > 0:
        ans += N % 10
        N //= 10
    if ans == 1:
        print((10))
    else:
        print(ans)

main()
# Original solution
# -*- coding: utf-8 -*-
N = int(eval(input()))
S = []

a = [0] * 6
for A in range(1, N):
    realA = A
    for i in [5,4,3,2,1,0]:
       a[i] = A // (10**i)
       A = A % (10**i)
       
    b = [0] * 6
    B = N - realA
    for i in [5,4,3,2,1,0]:
        b[i] = B // (10**i)
        B = B % (10**i)
        
    def sum(x):
        sum = 0
        for i in range(6):
            sum += x[i]
        return sum
    S.append(sum(a)+sum(b))
print((min(S)))

# Optimized solution
# -*- coding: utf-8 -*-
N = int(eval(input()))
S = []

def kakui(X):
    x = [0] * 6
    for i in [5,4,3,2,1,0]:
        x[i] = X // (10**i)
        X = X % (10**i)
    return(x)
def sum(x):
    sum = 0
    for i in range(6):
        sum += x[i]
    return sum

for A in range(1, N):
    B = N - A
    
    S.append(sum(kakui(A))+sum(kakui(B)))
print((min(S)))
# Original solution
N = int(eval(input()))
my_array = []
for A in range (1, N):
    my_array.append(sum(map(int, str(A))) + sum(map(int, str(N - A))))
print((min(my_array)))

# Optimized solution
N = int(eval(input()))
temp_min = sum(map(int, str(1))) + sum(map(int, str(N - 1)))
for A in range (2, N):
    x = sum(map(int, str(A))) + sum(map(int, str(N - A)))
    if x < temp_min:
        temp_min = x
print(temp_min)
# Original solution
n = int(eval(input()))
mn = float("inf")
for i in range(1,n):
  count = 0
  for s in str(i):
    count += int(s)
  for p in str(n-i):
    count += int(p)
  if count < mn:
    mn = count
print(mn)

# Optimized solution
n = int(eval(input()))
mn = float("inf")
for i in range(1,n):
  if sum(map(int,str(i))) + sum(map(int,str(n-i))) < mn:
    mn = sum(map(int,str(i))) + sum(map(int,str(n-i)))
print(mn)
# Original solution
# _*_ coding:utf-8 _*_
#  Atcoder_Grand_Contest025-A
#  https://atcoder.jp/contests/agc025/tasks/agc025_a
def digitEachDigitSum(number):
	numberStr=str(number)
	numberLength = len(numberStr)
	numberRange = list(range(0,numberLength,1))
	numberDigitSum = 0
	for eachNumberPosition in numberRange:
		eachNumberInt = int(numberStr[eachNumberPosition])
		numberDigitSum = numberDigitSum+eachNumberInt
	return numberDigitSum

def minDigitSum(givenNumber):
	minSum = 100000000
	checkNumberRange = list(range(1,givenNumber,1))
	for nowNumber in checkNumberRange:
		anotherNumber = givenNumber-nowNumber
		twoNumberSum = digitEachDigitSum(nowNumber)+digitEachDigitSum(anotherNumber)
		if twoNumberSum < minSum:
			minSum = twoNumberSum
#           MinSum chenged OutPut
#			print("{} = {} + {} =>{}".format(givenNumber,nowNumber,anotherNumber,minSum))

	return minSum

if __name__ == '__main__':
	N = int(eval(input()))
	solution=minDigitSum(N)
	print(("{}".format(solution)))

# Optimized solution
# Problem: https://atcoder.jp/contests/agc025/tasks/agc025_a
# Python 1st Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque


def II(): return int(sys.stdin.readline())


def MI(): return list(map(int, sys.stdin.readline().split()))


def LI(): return list(map(int, sys.stdin.readline().split()))


def LLI(rows_number): return [LI() for _ in range(rows_number)]


def digitSum(inputNum):
    result = 0
    inputNumStr = str(inputNum)
    for j in range(0, len(inputNumStr)):
        result = result + int(inputNumStr[j])
    return result


def solver(inputNum):
    result = 10**5
    # algorithm
    for j in range(1, inputNum):
        total = digitSum(j)+digitSum(inputNum-j)
        if total <= result:
            result = total
    return result


if __name__ == "__main__":
    print(("{}".format(solver(II()))))
# Original solution
# Problem: https://atcoder.jp/contests/agc025/tasks/agc025_a
# Python 2nd Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque


def II(): return int(sys.stdin.readline())


def MI(): return list(map(int, sys.stdin.readline().split()))


def LI(): return list(map(int, sys.stdin.readline().split()))


def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(inputNo):
    result = 36
    for a in range(1, inputNo, +1):
        strA = str(a)
        strB = str(inputNo-a)
        checkDigitAdd = 0
        for j in range(0, len(strA)):
            checkDigitAdd = checkDigitAdd + int(strA[j])
        for j in range(0, len(strB)):
            checkDigitAdd = checkDigitAdd + int(strB[j])
        if checkDigitAdd < result:
            result = checkDigitAdd
#            print("Then {} {} , changed".format(strA, strB))
    # algorithm
    return result


if __name__ == "__main__":
    print(("{}".format(solver(II()))))


# Optimized solution
# Problem: https://atcoder.jp/contests/agc025/tasks/agc025_a
# Python 3rd Try

import sys
# from collections import defaultdict
# import heapq,copy
# from collections import deque


def II(): return int(sys.stdin.readline())


def MI(): return list(map(int, sys.stdin.readline().split()))


def LI(): return list(map(int, sys.stdin.readline().split()))


def LLI(rows_number): return [LI() for _ in range(rows_number)]


def solver(inputNum):
    result = 0
    # algorithm
    totalDigit = 0
    inputStr = str(inputNum)
    for j in range(0, len(inputStr)):
        totalDigit = totalDigit + int(inputStr[j])
    if totalDigit == 1:
        result = 10
    else:
        result = totalDigit
    return result


if __name__ == "__main__":
    print(("{}".format(solver(II()))))
# Original solution
n = int(eval(input()))
absum = []
for a in range(1,n):
    b = n-a
    asum = 0
    bsum = 0
    alen = len(str(a))
    blen = len(str(b))
    for j in range(alen):
        a0 = (a//(10**j)) % 10
        asum = asum + a0
    for k in range(blen):
        b0 = (b//(10**k)) % 10
        bsum = bsum + b0
    absum.append(asum+bsum)
print((min(absum)))    

# Optimized solution
n = int(eval(input()))
absum = []
for a in range(1,n//2+1):
    b = n-a
    asum = 0
    bsum = 0
    alen = len(str(a))
    blen = len(str(b))
    for j in range(alen):
        a0 = (a//(10**j)) % 10
        asum = asum + a0
    for k in range(blen):
        b0 = (b//(10**k)) % 10
        bsum = bsum + b0
    absum.append(asum+bsum)
print((min(absum)))
# Original solution
n = int(eval(input()))
absum = []
for a in range(1,n):
    b = n-a
    asum = 0
    bsum = 0
    astr = str(a)
    bstr = str(b)
    for j in range(len(astr)):
        asum = asum + int(astr[j])
    for k in range(len(bstr)):
        bsum = bsum + int(bstr[k])
    absum.append(asum+bsum)
print((min(absum)))

# Optimized solution
n = int(eval(input()))
absum = []
for a in range(1,n//2+1):
    b = n-a
    asum = 0
    bsum = 0
    astr = str(a)
    bstr = str(b)
    for j in range(len(astr)):
        asum = asum + int(astr[j])
    for k in range(len(bstr)):
        bsum = bsum + int(bstr[k])
    absum.append(asum+bsum)
print((min(absum)))
# Original solution
def kakuwa(S):
    A = list(str(S))
    B = [int(x) for x in A]
    return sum(B)
    
N = int(eval(input()))
ans = 50
for i in range(1,N):
    ans = min(ans, kakuwa(i) + kakuwa(N-i))
print(ans)

# Optimized solution
def kakuwa(S):
    A = list(str(S))
    B = [int(x) for x in A]
    return sum(B)
    
N = int(eval(input()))
for i in range(1,5):
    if N%(10**i) == 0:
        ans = 10
        break
else:
    ans = kakuwa(N)
print(ans)
# Original solution
# -*- coding: utf-8 -*-

# AtCoder Grand Contest
# Problem A


def sum_digit(number):
    string = str(number)
    array = list(map(int, list(string)))
    return sum(array)


if __name__ == '__main__':
    n = int(eval(input()))
    a = 0
    digit_sum_min = 1000000

    for i in range(1, n):
        a = i
        b = n - a

        sum_a = sum_digit(a)
        sum_b = sum_digit(b)
        digit_sum_min = min(digit_sum_min, sum_a + sum_b)

    print(digit_sum_min)


# Optimized solution
# -*- coding: utf-8 -*-

# AtCoder Grand Contest
# Problem A


if __name__ == '__main__':
    n = int(eval(input()))

    # See:
    # https://www.youtube.com/watch?v=Ommfmx2wtuY
    if (n == 10) or (n == 100) or (n == 1000) or (n == 10000) or (n == 100000):
        print((10))
    else:
        print((sum(list(map(int, list(str(n)))))))
# Original solution
n = int(eval(input()))
mi = 10**9

def f(n):
    sums = 0
    while n>0:
        sums += n%10
        n //= 10
    return sums

for a in range(1, n+1):
    b = n-a
    if mi > f(a)+f(b) and b>0:
        mi = f(a)+f(b)
print(mi)

# Optimized solution
N = int(eval(input()))
ans = 10**9
def f(x):
    answer = 0
    while x>0:
        answer += x % 10
        x //= 10
    return answer

for a in range(1, N+1):
    b = N - a
    if f(a)+f(b)<ans and b != 0:
        ans = f(a)+f(b)
print(ans)
# Original solution
# AGC 025: A – Digits Sum
n = int(eval(input()))
answer = 999999999

for i in range(1, n // 2 + 1):
    num_A = str(i)
    num_B = str(n - i)

    sum_digits_A = sum([int(j) for j in num_A])
    sum_digits_B = sum([int(j) for j in num_B])

    answer = min(answer, sum_digits_A + sum_digits_B)

print(answer)

# Optimized solution
# AGC 025: A – Digits Sum
N = int(eval(input()))
n = N // 2 if N % 2 == 0 else N // 2 + 1
min_sum = 9999

for i in range(1, n + 1):
    sum_digits = 0
    A = i
    B = N - i

    while A != 0:
        sum_digits += A % 10
        A //= 10
    
    while B != 0:
        sum_digits += B % 10
        B //= 10
        
    min_sum = min(min_sum, sum_digits)

print(min_sum)
# Original solution
N = int(eval(input()))

def digitSum(X):

    ds = 0
    for x in str(X):
        ds += int(x)
    return ds

ans = N

for i in range(1, N):
    dgtSum = digitSum(i) + digitSum(N - i)
    if ans > dgtSum:
        ans = dgtSum

print(ans)


# Optimized solution
def sumDigit(x):
	total = 0
	while x > 0:
		total += x % 10
		x = x // 10

	return total

N = int(eval(input()))
ans = []

for a in range(1, N):
	sum_A = sumDigit(a)
	sum_B = sumDigit(N - a)
	ans.append(sum_A + sum_B)

print((min(ans)))
# Original solution
def digit_sum(x):
    a = list(range(1, x))
    min_n = x
    for i in a:
        b = x - i
        p = sum(list(map(int, list(str(i)))))
        q = sum(list(map(int, list(str(b)))))
        if min_n > (p+q):
            min_n = p+q
        if a == b:
            break
    return min_n
N = int(eval(input()))
print((digit_sum(N)))

# Optimized solution
N = int(eval(input()))
p = N
sums = 0
if N == 10 or N == 100 or N == 1000 or N == 10000 or N == 100000:
    print((10))
else:
    while p >= 1:
        sums += p%10
        p //= 10
    print(sums)
# Original solution
n = int(eval(input()))

def find(a):
    global total
    total = 0
    while a > 0:
        total += a % 10
        a //= 10
    return total

ans = float('inf')
for i in range(1,n):
    tmp = find(i) + find(n-i)
    ans = min(ans, tmp)
print(ans)

# Optimized solution
def findSumOfDigits(n):
    sum = 0
    while n > 0:
        sum += n % 10
        n //= 10
    return sum

n = int(eval(input()))
minTotal = float('inf')
for i in range(1,n+1):
    if 0 < n - i < n:
        a = findSumOfDigits(i)
        b = findSumOfDigits(n-i)
        if a + b < minTotal:
            minTotal = a + b
print(minTotal)
# Original solution
n=int(eval(input()))
res=100000
for i in range(1,n):
    j=n-i
    s=0
    for c in str(i):
        s+=int(c)
    for c in str(j):
        s+=int(c)
    res=min(res,s)
print(res)

# Optimized solution
n=int(eval(input()))
s=0
while n>0:
  s+=n%10
  n//=10
if s==1:
  print((10))
else:
  print(s)
# Original solution
def sumDigits(i):
    s = 0
    while i > 0:
        s += (i % 10)
        i = int(i / 10)
    return s

N = int(eval(input()))

m = 9*6
for i in range(1, N):
    k = N - i
    m = min(m, sumDigits(i) + sumDigits(k))

print(m)

# Optimized solution
def sumDigits(i):
    s = 0
    while i > 0:
        s += (i % 10)
        i = int(i / 10)
    return s

def main():
    N = int(eval(input()))
    m2 = 9 * 6
    for i in range(1, N + 1):
        k = N - i
        if k > 0:
            m2 = min(m2, sumDigits(i) + sumDigits(k))
    print(m2)

main()
# Original solution
def DigitsSum(n):
    sum = 0
    while (n != 0):
        sum += (n % 10)
        n = int(n / 10)
    return sum

N = int(eval(input()))

min_sum = 10**5
for i in range(1, N):
    sum = DigitsSum(i) + DigitsSum(N-i)
    if (sum < min_sum):
        min_sum = sum

print(min_sum)


# Optimized solution
def Digitsum(n):
    sum = 0
    while(n > 0):
        sum += (n % 10)
        n = int(n / 10)
    return sum

N = int(eval(input()))
n = N
ans = 0
while(True):
    if (n % 10 >= 2):
        #10のべき乗ではない
        ans = Digitsum(N)
        break
    elif (n % 10 == 1 and n >= 10):
        #10のべき乗ではない
        ans = Digitsum(N)
        break
    n = int(n / 10)
    if (n == 1):
        ans = 10
        break

print(ans)
# Original solution
N = int(eval(input()))
def sumof(N):
  sum = 0
  while(N>0):
    sum += N % 10
    N //= 10
  return sum

minsum = 9*10
for i in range(1,N//2+1):
  minsum = min(minsum,sumof(i) + sumof(N-i))
print(minsum)


# Optimized solution
NL = [int(x) for x in str(eval(input()))]
if NL[0] == 1 and sum(NL) == 1:
    print((10))
else:
    print((sum(NL)))
# Original solution
n=int(eval(input()))
ans=10**6
for i in range(1,n):
    a=list(map(int,list(str(i))))
    b=list(map(int,list(str(n-i))))
    c=sum(a)+sum(b)
    ans=min(ans,c)
print(ans)

# Optimized solution
n=int(eval(input()))
ans=10**6
for i in range(1,n+1):
    a=i
    b=n-i
    if a<=b:
        asum=sum(map(int,str(a)))
        bsum=sum(map(int,str(b)))
        if ans>(asum+bsum):
            ans=asum+bsum
print(ans)
# Original solution
N = int(eval(input()))
ans = N+1
for i in range(1,N):
    stra = str(i)
    strb = str(N-i)
    a = ''
    b = ''
    for j in range(len(stra)):
        a += stra[j]+'+'
    a = a[:-1]
    for j in range(len(strb)):
        b += strb[j]+'+'
    b = b[:-1]
    ans = min(ans,eval(a)+eval(b))
print(ans)

# Optimized solution
N = int(eval(input()))
ans = N+1
for i in range(1,N//2+1):
    stra = str(i)
    strb = str(N-i)
    a = ''
    b = ''
    for j in range(len(stra)):
        a += stra[j]+'+'
    a = a[:-1]
    for j in range(len(strb)):
        b += strb[j]+'+'
    b = b[:-1]
    ans = min(ans,eval(a)+eval(b))
print(ans)
# Original solution
N = int(eval(input()))

def SumDigits(num):
    sum = 0
    while True:
        sum += num % 10
        num //= 10
        if num == 0:
            break
    return sum

infinity = float('inf')
min = infinity

for x in range(1, N):
    if SumDigits(x) + SumDigits(N - x) < min:
        min = SumDigits(x) + SumDigits(N - x)
print(min)


# Optimized solution
N = int(eval(input()))

def SumDigits(num):
    sum = 0
    while True:
        sum += num % 10
        num //= 10
        if num == 0:
            break
    return sum

infinity = float('inf')
min = infinity

for x in range(1, N//2 + 1):
    #print('============')
    #print(x, N - x)
    #print(SumDigits(x) + SumDigits(N - x))
    if SumDigits(x) + SumDigits(N - x) < min:
        min = SumDigits(x) + SumDigits(N - x)
print(min)
# Original solution
N=int(eval(input()))
ans=100000000000
for A in range(1,N):
    B=N-A
    sa=0
    sb=0
    for i in range(len(str(A))):
        sa+=A%10
        A=(A-A%10)//10
    for j in range(len(str(B))):
        sb+=B%10
        B=(B-B%10)//10
    if sa+sb<ans:
        ans=sa+sb

print(ans)


# Optimized solution
N=int(eval(input()))
ans=100000000000
for a in range(1,N):
    b=N-a
    tempa=0
    tempb=0
    for i in range(len(str(a))):
        tempa+=a%10
        a=a//10
    for j in range(len(str(b))):
        tempb+=b%10
        b=b//10
    if tempa+tempb<ans:
        ans=tempa+tempb

print(ans)
# Original solution
n = int(eval(input()))

ans = float('inf')
for a in range(1, n):
    b = n - a
    dsum = 0
    for i in range(len(str(a))):
        x = int(str(a)[i])
        dsum += x
    for i in range(len(str(b))):
        x = int(str(b)[i])
        dsum += x
    ans = min(ans, dsum)

print(ans)

# Optimized solution
n = int(eval(input()))

def d_sum(x):
    return sum(int(y) for y in str(x))

ans = float('inf')
for a in range(1, n):
    b = n - a
    dsum = d_sum(a) + d_sum(b)
    ans = min(ans, dsum)

print(ans)
# Original solution
def func(x):
    if x // 10 == 0:
        return x
    else:
        return x % 10 + func(x // 10)

n = int(eval(input()))
ans = float('inf')
for a in range(1, (n // 2) + 1):
    ans = min(ans, func(a) + func(n - a))
print(ans)

# Optimized solution
def d_sum(x):
    res = 0
    while x > 0:
        res += x % 10
        x //= 10
    return res

n = int(eval(input()))

ans = float('inf')
for a in range(1, n // 2 + 1):
    b = n - a
    ans = min(ans, d_sum(a) + d_sum(b))

print(ans)
# Original solution
def d_sum(x):
    res = 0
    while x > 0:
        res += x % 10
        x //= 10
    return res

n = int(eval(input()))

ans = float('inf')
for a in range(1, n // 2 + 1):
    b = n - a
    ans = min(ans, d_sum(a) + d_sum(b))

print(ans)

# Optimized solution
from math import log
n = int(eval(input()))

if log(n, 10) % 1 == 0:
    ans = 10
else:
    ans = sum(map(int, list(str(n))))
print(ans)
# Original solution
x=int(eval(input()))
count=100000
suma=0
sumb=0
for a in range(1, x):
    b = x-a
    y = sum(map(int, str(a))) + sum(map(int, str(b)))
    if y<count:
        count=y
print(count)

# Optimized solution
x=int(eval(input()))
count=10000
for a in range(1, x):
    suma=0
    sumb=0
    b=x-a
    while (a > 0):
        suma += a%10
        a= a//10
    while (b > 0):
        sumb += b%10
        b=b//10
    count = min(count, suma+sumb)
print(count)
# Original solution
N = int(eval(input()))

result = 10 ** 10

for a in range(1, N):
    b = N - a
    A = 0
    while a != 0:
        A += a % 10
        a = a // 10
    B = 0
    while b != 0:
        B += b % 10
        b = b // 10

    result = min(result, A + B)

print(result)

# Optimized solution
def digit_sum(n):
    result = 0
    while n > 0:
        result += n % 10
        n = n // 10
    return result

N = int(eval(input()))
mi = 1e10
for i in range(1, N):
    mi = min(mi, digit_sum(i) + digit_sum(N - i))
print(mi)
# Original solution
def digit_sum(n):
    result = 0
    while n > 0:
        result += n % 10
        n = n // 10
    return result

N = int(eval(input()))
mi = 1e10
for i in range(1, N):
    mi = min(mi, digit_sum(i) + digit_sum(N - i))
print(mi)


# Optimized solution
N = int(eval(input()))
print((10 if N % 10 == 0 else sum(int(s) for s in str(N))))
# Original solution
N = int(eval(input()))
factor_a = []
factor_b = []
ans = N
for a in range(1, N):
    sum_a = sum([int(i) for i in str(a)])
    sum_b = sum([int(i) for i in str(N-a)])
    if sum_a + sum_b < ans:
        ans = sum_a + sum_b
print(ans)

# Optimized solution
N = int(eval(input()))
ans = N


def simulate(m):
    for a in range(1, m):
        global ans
        sum_a = sum([int(i) for i in str(a)])
        sum_b = sum([int(i) for i in str(N-a)])
        if sum_a + sum_b < ans:
            ans = sum_a + sum_b


if N % 2 == 0:
    simulate(N//2+1)
else:
    simulate(N//2+2)

print(ans)