import java.util.Scanner; public class Main { static boolean memo[]; static int ans, min; public static void main(String[] args) { Scanner sc = new Scanner(System.in); StringBuilder sb = new StringBuilder(); char[] s = sc.next().toCharArray(); String a = "", b = ""; int sum = 0; int idx = 0; for (int i = 0; i < s.length; i++) { if (s[i] == '+') { i++; if (!a.equals("")) { sum += Integer.parseInt(a); } a = ""; for (; i < s.length; i++) { if (s[i] != '*' && s[i] != '+') { a += s[i]; } else { i--; break; } } sum *= Integer.parseInt(a); a = ""; } else if (s[i] == '*') { i++; if (!a.equals("")) { sum += Integer.parseInt(a); } a = ""; for (; i < s.length; i++) { if (s[i] != '*' && s[i] != '+') { a += s[i]; } else { i--; break; } } sum += Integer.parseInt(a); a = ""; } else { a += s[i]; } } System.out.println(sum); } }