num=list(input()) import re if num.isdigit(): print(sum(num)) else: print(0)