using System; public class Test { public static void Main(string[] args) { char[] chars = Console.ReadLine().ToCharArray(); int sum = 0; for (int i = 0; i < chars.Length; i++) { int value = 0; if (int.TryParse(chars[i].ToString(), out value)) { sum += value; } } Console.WriteLine(sum); } }