x = list(input()) y = 0 for i in range(len(x)): y += int(x[i]) print(y)