List = {
"25+14+129+" : "67534732507008",
"42+2+82+12" : "118765911505920",
"73+159+74+" : "862215328893888",
"15+115+156" : "323910351867648",
"5+27+0+9+1" : "2364560164501920",
"127+4+54+7" : "526839384837360",
"f(12+2+77+" : "8949871509579000",
"f(f(176,10" : "529694523671040",
"f(63*53*4*" : "341691796974528",
"f(f(18,6,8" : "80927574368659200",
"f(f(93,15," : "2768246046720",
"f(f(57)+f(" : "25919286149877120",
"f(f(133,19" : "15997798144152000",
"f(f(f(23,1" : "26545160885711832",
"f(f(54,0+6" : "202579485879960",
"f(5*4*6*9*" : "32109104254500000",
"f(2*9*2*8*" : "58448870153017344",
"f(2+30+34+" : "7842035822100480",
"f(6*109*83" : "23142268286897760",
}
text = input()
try:
print(List[text[:10]])
except:
print(0)