using System; namespace yukicoder { public class Program { public static void Main(string[] args) { var n = Console.ReadLine(); var result = 0; foreach (var item in n) { var a = 0; result += int.TryParse(item+"", out a) ? a : 0; } Console.WriteLine(result); } } }