import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String checkStr=sc.next(); String[] letters=checkStr.split(""); int count=0; for(String letter:letters){ if(!(letter.matches("[a-z]"))){ count+=Integer.parseInt(letter); } } System.out.println(count); } }