N = list(input()) M = list(filter(lambda x: str.isdecimal(x) == 1, N)) print(sum(map(int, M)))