13 lines
191 B
Python
13 lines
191 B
Python
import sys
|
|
import re
|
|
|
|
sum = 0
|
|
for line in sys.stdin:
|
|
line = re.sub(r'[^\d]', '', line)
|
|
first = line[0]
|
|
last = line[-1]
|
|
value = int(first + last)
|
|
sum += value
|
|
|
|
print(sum)
|
|
|