#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;

int main(){
    while(cin>>c){
	if(isdigit(c))n=n*10+c-'0';
	else {ans+=n;n=0;}
    }
    cout<<ans+n<<endl;
}