package yukicoder; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Yuki289 { public static void main( String[] args ) { Scanner scan = new Scanner(System.in); String str = scan.next(); scan.close(); String[] strarr = str.split(""); String strNumber = "[1-9]"; Pattern p = Pattern.compile(strNumber); int number = 0; for (int i = 0; i < strarr.length; i++ ){ Matcher m = p.matcher(strarr[i]); if(m.find()){ number += Integer.parseInt(strarr[i].toLowerCase()); } } System.out.print(number); } }