时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
Groundhog took a math class. In this class, his math teacher said:
Any positive integer can be represented by the power of
. For example:
.
Further more,for

(

is expressed with

),

,
137 can be finally expressed as %2B2%2B2(0))%2B2(2%2B2(0))%2B2(0)%7D)
.
Another example:
)%2B2)%2B2(2(2%2B2(0)))%2B2(2(2)%2B2(0))%2B2%2B2(0))
.
Groundhog feels amazing and wants you to write a program to simulate the above content.You need to read in an expression that is a power of

and calculate its value.
输入描述:
Given a string, indicating the power representation.
输出描述:
Output the original number.
示例1
输入
复制
2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)
备注:
The range of answers :
,and the length of the input data shall not exceed
.