import java.io.*; import java.util.*; import java.math.*; class Main289 { public static void out (Object out) { System.out.println(out); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int ans = 0; String s = br.readLine(); for (int i = 0; i < s.length(); i++) { if ((s.charAt(i) + "").matches("[0-9]")) { ans += s.charAt(i) - '0'; } } out(ans); } }