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