using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { WriteLine(ReadLine().Select(x => 0x30 < x && x < 0x40 ? int.Parse(x + "") : 0).Sum()); } }