# name = "harshit"

# for i in range(len(name)):
#     print(name[i])


# name = " himanshu"
# for i in name:
#     print(i)

num = input("Enter a number : ")
total = 0

for i in num:
    total += int(i)
    
print(total)

            