#include<bits/stdc++.h>

using namespace std;

int main(){

  string s;

  int total=0;
  
  while(cin>>s){
	
	for(int i=0;i<s.size();++i){

	  if(s[i] >= '0' && s[i] <= '9')
		total += s[i] - '0';
	  
	}
	
  }

  cout<<total<<endl;
  
}

