# for i in range(1,11):
#     print(f"PARTH : {i}")
#==========================================

# n = int(input("Enter a number :"))
# total = 0
# for i in range(1,n+1):
#     total += i
# print(total)

#==========================================

total = 0
num = input("Enter Number :")
for i in range (0,len(num)):
    total += int(num[i])
print(total)