import java.util.Scanner; public class Main_yukicoder49 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int ret = 0; boolean p = true; for (int i = 0; i < s.length(); ) { int plus = s.indexOf('*', i); if (plus == -1) { plus = s.length(); } int mul = s.indexOf('+', i); if (mul == -1) { mul = s.length(); } int next; if (plus < mul) { next = plus; } else { next = mul; } int tmp = Integer.parseInt(s.substring(i, next)); if (p) { ret += tmp; } else { ret *= tmp; } if (next == plus) { p = true; } else { p = false; } i = next + 1; } System.out.println(ret); sc.close(); } }