using System.Linq;using static System.Console;class P{static void Main(){WriteLine(ReadLine().Sum(x=>x==48?10:x-48));}}