for(n in scan("stdin"))write(45-sum(n%/%10^(0:9)%%10),1)