s = input() n = 0 for i in range(len(s)): n += int(s[i]) print(n)