import re,sys

print((sum([sum(map(int,re.sub("\D", " ", e).split()))for e in sys.stdin])))

import sys

print((sum(map(int,''.join([' ',c][c.isdigit()]for e in sys.stdin for c in e).split()))))

import re, sys

print((sum([sum(map(int, re.sub("\D", " ", e).split())) for e in sys.stdin])))

import sys

print(
    (
        sum(
            map(
                int,
                "".join([" ", c][c.isdigit()] for e in sys.stdin for c in e).split(),
            )
        )
    )
)

-import re, sys +import sys -print((sum([sum(map(int, re.sub("\D", " ", e).split())) for e in sys.stdin]))) +print( +    ( +        sum( +            map( +                int, +                "".join([" ", c][c.isdigit()] for e in sys.stdin for c in e).split(), +            ) +        ) +    ) +)