#include<stdio.h>
int main(){
  int i = 0,j = 0,k,sum[100],jud = 0,b= 0,a1,a2;
  char a[100];

  while(1){
    scanf("%c",&a[b]);
    if(a[b] == ' ')continue;
    if(a[b] == '\n')break;
    b++;
  }
 
  while(1){
    a1 = (int)a[i] - 48;
    a2 = (int)a[i+1] - 48;
    if(a[i+2] == '+')sum[j] = a1 + a2;
    if(a[i+2] == '-')sum[j] = a1 - a2;
    if(a[i+2] == '*')sum[j] = a1 * a2;
    i+=3;
    j++;
    if(i == b || a[i] == '*')break;
  }

  jud += sum[0];

  if(a[i] == '*')jud *= sum[1];

  printf("%d\n",jud);
  return 0;
}