import java.util.Scanner; public class Sansunoshukudai { static StringBuilder str = new StringBuilder(); public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner s = new Scanner(System.in); str.append(s.nextLine()); s.close(); int sum = 0; while(str.length() != 0){ char c = str.charAt(0); if(c == '*'){ str.deleteCharAt(0); sum += getnum(); }else if(c == '+'){ str.deleteCharAt(0); sum *= getnum(); }else{ sum += getnum(); } } System.out.println(sum); } static int getnum(){ int p = str.indexOf("*"); int m = str.indexOf("+"); int num = 0; if(p != -1 && m != -1){ num = Integer.parseInt(str.substring(0, Math.min(p, m))); str.delete(0, Math.min(p, m)); }else if(p != -1){ num = Integer.parseInt(str.substring(0, p)); str.delete(0, p); }else if(m != -1){ num = Integer.parseInt(str.substring(0, m)); str.delete(0, m); }else{ num = Integer.parseInt(str.toString()); str.delete(0, str.length()); } return num; } }