N = int(eval(input()))

if N % 10 == 0:

     print((10))

else:

    a = [int(x) for x in str(N)]

    print((sum(a)))
n = int(eval(input()))

if n%10 == 0:

    print((10))

else:

    nums = list(map(int,[x for x in str(n)]))

    print((sum(nums)))
N = int(eval(input()))
if N % 10 == 0:
    print((10))
else:
    a = [int(x) for x in str(N)]
    print((sum(a)))

n = int(eval(input()))
if n % 10 == 0:
    print((10))
else:
    nums = list(map(int, [x for x in str(n)]))
    print((sum(nums)))

-N = int(eval(input())) -if N % 10 == 0: +n = int(eval(input())) +if n % 10 == 0: -    a = [int(x) for x in str(N)] -    print((sum(a))) +    nums = list(map(int, [x for x in str(n)])) +    print((sum(nums)))