import java.util.Arrays; import java.util.List; import java.util.Scanner; public class App { public static void main(String[] args) throws Exception { // yukicorder No.9011 数字を全て足そう(数字だけ) Scanner scanner = new Scanner(System.in); String s = scanner.nextLine(); scanner.close(); List sList = Arrays.asList(s.split("")); int total = sList.stream().mapToInt(Integer::parseInt).sum(); System.out.println(total); } }