logo AlgoBeat OnlineJudge
登录 注册

#206204. [NWRRC 2015] Easy Arithmetic

内存限制:256 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Eva is a third-grade elementary school student. She has just learned how to perform addition and subtraction of arbitrary-precision integers. Her homework is to evaluate some expressions. It is boring, so she decided to add a little trick to the homework. Eva wants to add some plus and minus signs to the expression to make its value as large as possible.

输入格式

The single line of the input file contains the original arithmetic expression. It contains only digits, plus and minus signs.

The original expression is correct, that is:

numbers have no leading zeroes;

there are no two consecutive signs;

the last character of the expression is a digit.

The length of the original expression does not exceed characters.

输出格式

Output a single line -- the original expression with some plus and minus signs added. Output expression must satisfy the same correctness constraints as the original one. Its value must be as large as possible.

样例

样例输入 1

10+20-30

样例输出 1

10+20-3+0

样例输入 2

-3-4-1

样例输出 2

-3-4-1

样例输入 3

+10

样例输出 3

+10

数据范围与提示

Time limit: 2 s, Memory limit: 256 MB.