import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int ans = 0; char prev = '*'; int tmp = 0; for (char c : sc.next().toCharArray()) { if (c == '*' || c == '+') { if (prev == '*') { ans += tmp; } else { ans *= tmp; } tmp = 0; prev = c; } else { tmp *= 10; tmp += c - '0'; } } if (prev == '*') { ans += tmp; } else { ans *= tmp; } System.out.println(ans); } }