import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); char charS[] = S.toCharArray(); int cnt = 0; for(int i = 0;i < charS.length; i++) { if(charS[i] == '1' || charS[i] == '2' || charS[i] == '3' || charS[i] == '4' || charS[i] == '5' || charS[i] == '6' || charS[i] == '7' || charS[i] == '8' || charS[i] == '9') { cnt+=Integer.parseInt(String.valueOf(charS[i])); } } System.out.println(cnt); } }