using System; using System.Collections.Concurrent; using System.ComponentModel; namespace yukicoder3 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); int ans = 0; for (int A = 0; A < input.Length; A++) { for (int B = 0; B <= 9; B++) { if (input[A].ToString() == B.ToString()) { ans += int.Parse(input[A].ToString()); } } } Console.WriteLine(ans); } } }