import java.util.Scanner; public class a{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a=sc.next(); int sum=0; for(int i=0; i='a'&&a.charAt(i)<='z' || a.charAt(i)>='A'&&a.charAt(i)<='Z'){ }else{ sum+=Integer.parseInt(String.valueOf(a.charAt(i))); } } System.out.println(sum); } }