import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); char[] s = str.toCharArray(); int ret = 0; for(char c:s) { if (c>='0' && c<='9') { ret += c - '0'; } } System.out.println(ret); } }