integer(16)N,ans
read*,N
if(N==10.or.N==100.or.N==1000.or.N==10000.or.N==100000)then
  ans=10
else
  ans=0
  do i=4,0
    ans=ans+N/(10**i)
    N=N-(N/10**i)*(10**i)
  end do
endif
print"(i0)",ans
    
end