import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] Array = sc.next().toCharArray(); int total = 0; for(char ch:Array) { if(ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9') { total += Character.getNumericValue(ch); } } System.out.println(total); } }