S = input() ans = sum(int(a) for a in S) print(ans)