import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000289_Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int sum = 0; for(int i = 0; i < str.length(); i++) { char c = str.charAt(i); if('0' <= c && c <= '9') sum +=Integer.parseInt(String.valueOf(c)); } System.out.println(sum); } }