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