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