import java.util.Scanner; import java.lang.Character; class main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int ans = 0; String str = scan.next(); for(int i = 0; i < str.length(); i++){ char ch = str.charAt(i); if( Character.isDigit(ch) ){ ans += Integer.parseInt("" +ch); } } System.out.println(ans); } }