package yukicoder; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { int count = 0; String S = buff.readLine(); for(int i = 0; i < S.length(); ++i){ if(S.charAt(i) >= '0' && S.charAt(i) <= '9'){ count += Character.getNumericValue(S.charAt(i)); } } System.out.println(count); } catch (Exception e) { e.getStackTrace(); } } }