C*++ language is quite similar to C++. The similarity manifests itself in the fact that the programs written in C*++ sometimes behave unpredictably and lead to absolutely unexpected effects. For example, let's imagine an arithmetic expression in C*++ that looks like this (*expression* is the main term):
 -  *expression* ::= *summand* | *expression* + *summand* | *expression* - *summand* -  *summand* ::= *increment* | *coefficient***increment* -  *increment* ::= a++ | ++a -  *coefficient* ::= 0|1|2|...|1000 
For example, "5*a++-3*++a+a++" is a valid expression in C*++.

Thus, we have a sum consisting of several summands divided by signs "+" or "-". Every summand is an expression "a++" or "++a" multiplied by some integer coefficient. If the coefficient is omitted, it is suggested being equal to 1.

The calculation of such sum in C*++ goes the following way. First all the summands are calculated one after another, then they are summed by the usual arithmetic rules. If the summand contains "a++", then during the calculation first the value of the "a" variable is multiplied by the coefficient, then value of "a" is increased by 1. If the summand contains "++a", then the actions on it are performed in the reverse order: first "a" is increased by 1, then — multiplied by the coefficient.

The summands may be calculated in any order, that's why sometimes the result of the calculation is completely unpredictable! Your task is to find its largest possible value.
The first input line contains an integer *a* ( - 1000 ≤ *a* ≤ 1000) — the initial value of the variable "a". The next line contains an expression in C*++ language of the described type. The number of the summands in the expression does not exceed 1000. It is guaranteed that the line describing the expression contains no spaces and tabulation.
C * ++语言与C ++非常相似。相似性体现在这样一个事实，即用C * ++编写的程序有时表现得不可预测并导致绝对意想不到的效果。例如，让我们想象一下C * ++中的算术表达式看起来像这样（表达式表达式是主要术语）：

表达式表达式:: = summand summand |表达式+ summand表达式+ summand |表达式 - 加数表达式 - 加数
Summand summand :: =增量增量|系数系数*增量增量
增量增量:: = a ++ | ++一个
系数系数:: = 0 | 1 | 2 | ... | 1000
例如，“5 * a ++ - 3 * ++ a + a ++”是C * ++中的有效表达式。

因此，我们有一个由几个加数除以符号“+”或“ - ”组成的和。每个summand都是一个表达式“a ++”或“++ a”乘以某个整数系数。如果省略系数，则建议等于1 1。

在C * ++中计算这种总和的方法如下。首先，所有的加数一个接一个地计算，然后用通常的算术规则求和。如果加数包含“a ++”，则在计算期间首先将“a”变量的值乘以系数，然后将“a”的值增加1 1。如果加数包含“++ a”，则对其执行的操作按相反顺序执行：首先“a”增加1 1，然后 - 乘以系数。

可以按任何顺序计算加数，这就是为什么有时计算结果完全不可预测的原因！您的任务是找到其最大可能值。

输入和输出格式
输入格式：
第一个输入行包含一个整数aa（-1000 <= a <= 1000 -1000 <= a <= 1000） - 变量“a”的初始值。下一行包含所描述类型的C * ++语言的表达式。表达式中的summands数不超过1000 1000。保证描述表达式的行不包含空格和制表。

输出格式：
输出单个数字 - 表达式的最大可能值。

输入和输出样本
输入样本＃1：
1
5 *一个++ - 3 * ++ A + A ++
输出样本＃1：
11
输入样本＃2：
3
一个+++++一
输出样本＃2：
8
描述
最初a = 3 a = 3。假设首先计算第一个加数，然后计算第二个加数。第一个加数等于3 3，aa的值增加1 1。在计算第二个加数时，aa再次增加（等于5 5）。第二个加数的值是5 5，它们一起给出8 8。如果我们先计算第二个加数，然后再计算第一个加数，则两个加数等于4 4，结果也是8 8。
