#include<iostream>
#define _USE_MATH_DEFINES
#include<math.h>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
struct edge{
public: int to,cost;
		edge(int a,int b){
		to=a;
		cost=b;
		}
};
struct node{
public: int pos,cost;
		node(int a, int b){
			pos=a;
			cost=b;
		}
		bool operator <(const node rhs) const{
			return cost>rhs.cost;
		}
};


int main(){
string s;
cin>>s;
int len=s.length();
int t=0;
int sum=0;
for (int i=0;i<len;i++){
	if(s[i]<='9'&&s[i]>='0') t=t*10+s[i]-'0';
	else {
		sum+=t;
		t=0;
	}
	
}
cout<<sum<<endl;
}