import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int ans = 0; String st = ""; int p = 0; String c = ""; for(int i = 0; i < s.length(); i++) { String str = String.valueOf(s.charAt(i)); if(str.equals("*")) { int d = Integer.parseInt(st); st = ""; if(p == 0) { ans += d; } else { if(c.equals("*")) { ans += d; } else { ans *= d; } } p++; c = "*"; } else if(str.equals("+")) { int d = Integer.parseInt(st); st = ""; if(p == 0) { ans += d; } else { if(c.equals("*")) { ans += d; } else { ans *= d; } } p++; c = "+"; } else { st += str; int d = Integer.parseInt(st); if(i == s.length() - 1) { if(c.equals("*")) { ans += d; } else { ans *= d; } } } } System.out.println(ans); } }