using System; namespace ConsoleApp11 { class Program { static void Main(string[] args) { int sum = 0; string S = Console.ReadLine(); S.ToCharArray(); for(int i = 0; i < S.Length; i++) { if(S[i] == '0' || S[i] == '1' || S[i] == '2' || S[i] == '3' || S[i] == '4' || S[i] == '5' || S[i] == '6' || S[i] == '7' || S[i] == '8' || S[i] == '9') { string s = S[i].ToString(); int num = int.Parse(s); sum += num; } } Console.WriteLine(sum); } } }