import java.util.Scanner; public class sumNum { public static void main(String[] args) { Scanner sn = new Scanner(System.in); String s = sn.next(); sn.close(); char[] c = s.toCharArray(); int num = 0; for (int i = 0; i < s.length(); i++) { if (c[i] >= '0' && c[i] <= '9') { num += Integer.parseInt("" + c[i]); } else { continue; } } System.out.println(num); } }