import java.util.Scanner; public class Main { static Scanner in = new Scanner(System.in); public static void main(String[] args) { String[] s = in.nextLine().replaceAll("(\\+|\\*)", "_$1_").split("_"); int sum = Integer.parseInt(s[0]); for(int i = 1; i < s.length; i += 2){ if(s[i].equals("+")){ sum *= Integer.parseInt(s[i + 1]); }else if(s[i].equals("*")){ sum += Integer.parseInt(s[i + 1]); } } System.out.println(sum); } }