Groundhog and 2-Power Representation
时间限制: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:.

And powers are expressed in parentheses.That is , stands for .Therefore, can be expressed as .

Further more,for is expressed with ),,137 can be finally expressed as .

Another example:.

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)

输出

复制
1315

备注:

The range of answers :,and the length of the input data shall not exceed .