using System; using System.Linq; using System.Collections.Generic; using System.Text; using static System.Console; using static System.Math; class Program { static void Main(string[] args) { string s = ReadLine(); int sum = 0; for (int i = 0; i < s.Length; i++) { sum += s[i] - '0'; } WriteLine(sum); } }