s = raw_input() l = [] p = 0 q = 0 while p < len(s): while q < len(s) and s[q] != '*' and s[q] != '+': q += 1 l.append(int(s[p:q])) if q < len(s): l.append(s[q]) q += 1 p = q n = l[0] for i in range(1,len(l),2): if l[i] == '*': n += l[i+1] else: n *= l[i+1] print n