import sys input=sys.stdin.readline print(sum(list(map(int,input()))))