using System; using System.Linq; class Program { static void Main() { var inp = Console.ReadLine(); int ans = 0; foreach (var c in inp) { int i = (int)Char.GetNumericValue(c); if(i >= 0 && i <= 9) { ans += i; } } Console.WriteLine(ans); } }