Technocup 2017 - Elimination Round 1 (Unofficially Open for Everyone, Rated for Div. 2)
B
Bill Total Value
Codeforces
1600
原题
← AC →
翻译中…

Vasily exited from a store and now he wants to recheck the total price of all purchases in his bill. The bill is a string in which the names of the purchases and their prices are printed in a row without any spaces. Check has the format "name1price1name2price2...namenpricen", where $*name*_{*i*}$ (name of the $*i*$-th purchase) is a non-empty string of length not more than $10$, consisting of lowercase English letters, and $*price*_{*i*}$ (the price of the $*i*$-th purchase) is a non-empty string, consisting of digits and dots (decimal points). It is possible that purchases with equal names have different prices.

翻译中…

The price of each purchase is written in the following format. If the price is an integer number of dollars then cents are not written.

翻译中…

Otherwise, after the number of dollars a dot (decimal point) is written followed by cents in a two-digit format (if number of cents is between $1$ and $9$ inclusively, there is a leading zero).

翻译中…

Also, every three digits (from less significant to the most) in dollars are separated by dot (decimal point). No extra leading zeroes are allowed. The price always starts with a digit and ends with a digit.

翻译中…

For example:

翻译中…
  • "234", "1.544", "149.431.10", "0.99" and "123.05" are valid prices,
  • ".333", "3.33.11", "12.00", ".33", "0.1234" and "1.2" are not valid.
翻译中…

Write a program that will find the total price of all purchases in the given bill.

翻译中…

Input

翻译中…

The only line of the input contains a non-empty string $*s*$ with length not greater than $1000$ — the content of the bill.

翻译中…

It is guaranteed that the bill meets the format described above. It is guaranteed that each price in the bill is not less than one cent and not greater than $10^{6}$ dollars.

翻译中…

Output

翻译中…

Print the total price exactly in the same format as prices given in the input.

翻译中…

样例

Input #1
chipsy48.32televizor12.390
Output #1
12.438.32
InputCopy OutputCopy
Input #2
a1b2c3.38
Output #2
6.38
InputCopy OutputCopy
Input #3
aa0.01t0.03
Output #3
0.04
InputCopy OutputCopy
题目信息
标签
表达式解析
模拟
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。