Victor's Various Adventures - Victor Climbs Mt. Everest

View as PDF

Submit solution


Points: 5
Time limit: 3.0s
Memory limit: 256M

Author:
Problem type

This is problem 1 of the Victor's Various Adventures problem set.

Victor is climbing Mt. Everest, but on the way up, he meets a magical genie. The genie will not let him pass unless he answers the following question:

Given a string S, containing a mathematical expression with + and - operations, evaluate the result to one decimal place. Note, the string will always end with a =, and the numbers provided will always be positive.

Will you help Victor pass the genie?

Input Specification

On a single line, the aforementioned mathematical expression will be given.

Output Specification

Output the evaluated result to one decimal place.

Sample Input

5 + 11 - 4 + 234.5 - 3 + 22.123 =

Sample Output

265.6

Sample Input 2

3 + 2 + 11 =

Sample Output 2

16.0

Comments

There are no comments at the moment.