using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp19 { class Program { static void Main(string[] args) { char[] chararry = Console.ReadLine().ToCharArray(); int sum = 0; for (int i = 0; i < chararry.Length; i++) { if (char.IsNumber(chararry[i])) { sum += int.Parse(chararry[i].ToString()); } } Console.WriteLine(sum); Console.ReadLine(); } } }