S = input() A = list(map(int, S)) print(sum(A))