S = input() fig = [] for s in S: fig.append(int(s)) print(sum(fig))