#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <map>


#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

string ws;
int cnt =0;
	while(cin >> ws){
		if(cin.eof()) break;
		int cnt1=0;
		rep(i,ws.size()){
			if(ws[i] >= '0' && ws[i] <= '9'){
				if(cnt1 > 0) cnt1 *= 10;
				cnt1 += ws[i] - '0';
			}else{
				cnt += cnt1;
				cnt1=0;
			}
		}
		if(cnt1>0) cnt += cnt1;
	}
	cout << cnt << endl;
	return 0;
	
}