using System; class Program { static void Main(string[] args) { string S = Console.ReadLine(); int num = 0, sum = 0; for (int i = 0; i <= S.Length-1; i++) { if (int.TryParse(S.Substring(i,1), out num)) sum += num; } Console.WriteLine(sum); } }