import java.util.Scanner; class NumAdd { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str = in.next(); int c, ans; ans = 0; for(int i = 0; i < str.length(); i++) { try { char x = str.charAt(i); String y = Character.toString(x); c = Integer.parseInt(y); } catch(Exception e) { continue; } ans += c; } System.out.println(ans); } }