#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <math.h>
#include <map>
#include <queue>
#include <string>
using namespace std;

typedef long long ll;

int ans=0,n=0;
char c;
string s;

int main(){
    while(cin>>s){
	int cur=0;
	while(cur<s.size()){
	    if(isdigit(s[cur]))n=n*10+s[cur]-'0';
	    else {ans+=n;n=0;}
	    cur++;
	}
	ans+=n;n=0;
    }
    cout<<ans+n<<endl;
}