import java.util.*; import java.util.Map.Entry; import java.math.*; import java.awt.geom.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] S = sc.next().toCharArray(); int count = 0; for(int i = 0; i < S.length; i++) { if(S[i] >= '0' && S[i] <= '9') { count += S[i] - '0'; } } System.out.println(count); } }