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