Hide

Free-Form Input

You are to read a sequence of lines and, for each line, compute the sum of the numbers on that line. Each line contains one or more numbers. Numbers are separated by commas. A number may be positive or negative (preceded by a minus sign), and may or may not contain a decimal part. Blanks may be imbedded between numbers and within numbers.

Input

Each line of input contains up to $72$ characters and adheres to the format described above. Every number will be at most $10^6$ in absolute value and contain at most $6$ digits after the decimal point.

Output

For each line of input, print a single number that is the sum of all numbers on that line. Your answer will be accepted if it is within an absolute or relative error of $1e-6$ of the correct solution.

Sample Input 1 Sample Output 1
1  23.4,-5  ,  .00 2 , 1 8 6
304.402
Sample Input 2 Sample Output 2
123, 4.56  
 0 . 0 , 0 . 0 
 98 .1 7, 202   
127.56
0.0
300.17

Please log in to submit a solution to this problem

Log in