import java.util.LinkedList; import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ String s=sc.nextLine(); int sum=0; s=s.replaceAll("[^0-9]",""); LinkedListqueue=new LinkedList(); for(char element:s.toCharArray()){ queue.offer(Character.getNumericValue(element)); }while(queue.isEmpty()==false){ sum+=queue.removeFirst(); }System.out.println(sum); } }