#include <iostream>
using namespace std;
int main ( void ) {
string input;
while ( getline ( cin, input ) ) {
long long ans = 0, sum = 0;
for ( int i = 0; i < input.length(); ++i ) {
if ( input[i] >= '0' && input[i] <= '9' )
sum = sum * 10 + ( input[i] - '0' );
else {
ans += sum;
sum = 0;
}
}
cout << ans + sum << endl;
}
return 0;
}