import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String s = scan.next(); char[] c = s.toCharArray(); int sum = 0; for (int i = 0; i < c.length; i++) { if (Character.isDigit(c[i])) { sum += Character.getNumericValue(c[i]); } } System.out.println(sum); scan.close(); } }