import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    int t=0;
    foreach(s;stdin.byLine())
    {
        int n=0;
        foreach(c;s)
            if('0'<=c && c<='9') n=n*10+c-'0';
            else t+=n,n=0;
    }
    writeln(t);
}