import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		char[] S = scanner.next().toCharArray();
		int ans = 0, temp = 0, op = 0;
		for (int i = 0; i < S.length; i++) {
			if (S[i] == '+') {
				if (op == 1) {
					ans *= temp;
				} else {
					ans += temp;
				}
				temp = 0;
				op = 1;
			} else if (S[i] == '*') {
				if (op == 1) {
					ans *= temp;
				} else {
					ans += temp;
				}
				temp = 0;
				op = 0;
			} else {
				temp *= 10;
				temp += S[i] - '0';
			}
		}
		if (op == 1) {
			ans *= temp;
		} else {
			ans += temp;
		}
		temp = 0;

		System.out.println(ans);
	}

}