import java.io.*; import java.util.*; import java.math.*; class Main { public static void out (Object o) { System.out.println(o); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] c = br.readLine().toCharArray(); boolean isAdd = true; int ans = 0, i = 0; while (i < c.length) { int work = 0; int j = i; while (j < c.length && (c[j] + "").matches("[0-9]")) { work = work * 10 + (c[j++] - '0'); } ans = isAdd ? ans + work : ans * work; if (j < c.length) isAdd = c[j++] == '*'; i = j; } out(ans); } }