import java. util. Scanner; public class Main{ public static void main (String[] args){ Scanner scanner = new Scanner (System. in); String number = scanner. next(); int x = 0; String[] count = number. split (""); for (int j = 0; j < number. length(); j ++){ Integer a = Integer. parseInt (count[j]); x += a; } System. out. println (x); } }