S = list(map(lambda x: x- 48, filter(lambda x: 48< x <59, map(ord, (list(input())))))) print(sum(S))