s = list(input()) s = list(map(int,s)) print(sum(s))