import java.util.Scanner; public class No_289 { static String[] numbers = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static boolean checkOfWord(String c) { for (String n : numbers) { if (c.equals(n)) { return true; } } return false; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int sum = 0; for (int i = 0; i < s.length(); i++) { String check = s.substring(i, i + 1); if (checkOfWord(check)) { int j = Integer.parseInt(check); sum += j; } } System.out.println(sum); sc.close(); } }