import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class 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++) { String target = String.valueOf(str.charAt(i)); sum += target.matches("[0-9]") ? Integer.parseInt(target) : 0; } System.out.println(sum); } }