#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
long long ans=0;
cin>>s;
for(int i=0;i<s.size();++i)
{
if('0'<=s[i]&&'9'>=s[i])
{
long long t=0;
for(;i<s.size()&&'0'<=s[i]&&s[i]<='9';i++)
{
t=t*10+(s[i]-'0');
}
ans+=t;
}
}
cout<<ans<<endl;
return 0;
}