#C7957. Addition Expression Evaluator

    ID: 51885 Type: Default 1000ms 256MiB

Addition Expression Evaluator

Addition Expression Evaluator

Given a string representing a mathematical expression in the form $$ n_1+n_2+\cdots+n_k $$ where each $$ n_i \ge 0 $$ is a non-negative integer, compute the sum of these numbers. The expression consists solely of digits and the '+' character. If the input string is empty, the result is considered to be 0.

For example, if the input is "12+34+5", the output should be 51.

inputFormat

The input is provided via standard input (stdin) as a single line. This line is a string representing the addition expression, for example:
12+34+56
It may also be an empty line, in which case the result is 0.

outputFormat

Output the result as a single integer to standard output (stdout). This integer is the sum of the numbers in the given expression.## sample

1+1
2