import java.util.HashSet; import java.util.Scanner; public class Main { public static int solve(String S){ int sum = 0, i = 0; String ss = ""; String before = ""; while(true){ char si = S.charAt(i); if (si == '*' || si == '+') { sum = Integer.parseInt(ss); before = String.valueOf(si); i++; break; } else{ ss += si; i++; } } ss = ""; while(i < S.length()){ char si = S.charAt(i); if (si == '*') { if(before.equals("*")){ sum += Integer.parseInt(ss); } else { sum *= Integer.parseInt(ss); } before = String.valueOf(si); ss = ""; } else if (si == '+') { if (before.equals("*")) { sum += Integer.parseInt(ss); } else{ sum *= Integer.parseInt(ss); } before = String.valueOf(si); ss = ""; } else{ ss += String.valueOf(si); if (i == S.length() - 1) { if (before.equals("*")) { sum += Integer.parseInt(ss); } else { sum *= Integer.parseInt(ss); } } } i++; } return sum; } public static void main(String[] args){ Scanner sc = new Scanner(System.in); String S = sc.next(); System.out.println(solve(S)); } }