using System; using System.Collections.Generic; using System.Linq; class Program { public void Solve() { string S = Console.ReadLine(); int ans = 0; for (int i = 0; i < S.Length; i++) { if (S[i] < 48 || 57 < S[i]) continue; ans += int.Parse(S[i].ToString()); } Console.WriteLine(ans); } static void Main() { var solver = new Program(); solver.Solve(); } }