S=list(input()) for i in range(9): if(int(S[i])==0): S[i]='10' sum=0 for i in range(9): sum=sum+int(S[i]) print(sum)