<gh_stars>0
# https://atcoder.jp/contests/abc023/tasks/abc023_a
X = int(input())
print((X % 10) + (X // 10))

# https://atcoder.jp/contests/abc023/tasks/abc023_a
X = int(input())
print((X % 10) + (X // 10))
# https://atcoder.jp/contests/abc023/tasks/abc023_a