i = input() count = 0 for j in i: count += int(j) print(count)