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