def calc(num):
    lst = []
    while num > 0:
        lst.append(num % 10)
        n //= 10
    return sum(lst)


N = int(input())
print(calc(N))

6de1d5233eb8dccaa746de84c3f4edeed98c0dfb
<mask token>

def calc(num):
    lst = []
    while num > 0:
        lst.append(num % 10)
        n //= 10
    return sum(lst)


<mask token>

def calc(num):
    lst = []
    while num > 0:
        lst.append(num % 10)
        n //= 10
    return sum(lst)


<mask token>
print(calc(N))

def calc(num):
    lst = []
    while num > 0:
        lst.append(num % 10)
        n //= 10
    return sum(lst)


N = int(input())
print(calc(N))
