import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class No0289 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { char[] a = br.readLine().toCharArray(); int sum = 0 ; for(int i =0; i < a.length; i++){ int code= (int)a[i]; if(47 < code && code < 58){ sum += Integer.parseInt(Character.toString(a[i])); } } System.out.println(sum); } catch (IOException e) { e.printStackTrace(); } } }