import java.util.Scanner; public class Yuki289 { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String str = scan.next(); char[] beforeOmitCharArr = str.toCharArray(); int total = 0; for(int i = 0; i < beforeOmitCharArr.length; i++){ if(isNum((beforeOmitCharArr[i]))){ total = total + Character.getNumericValue(beforeOmitCharArr[i]); } } System.out.println(total); } static boolean isNum(char ch) { if(ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5'|| ch == '6' || ch == '7' || ch == '8' || ch == '9'){ return true; }else{ return false; } } }