#include<bits/stdc++.h>
using namespace std;
stack<int> st;
int main(){
char op;
int tmp=0;
while((op=getchar())!='@'){
if(op>='0'&&op<='9')tmp=tmp*10+op-'0';
if(op=='.')st.push(tmp),tmp=0;
if(op=='+'){
int b=st.top();
st.pop();
int a=st.top();
st.pop();
st.push(a+b);
}
if(op=='-'){
int b=st.top();
st.pop();
int a=st.top();
st.pop();
st.push(a-b);
break;
}
if(op=='*'){
int b=st.top();
st.pop();
int a=st.top();
st.pop();
st.push(a*b);
}
if(op=='/'){
int b=st.top();
st.pop();
int a=st.top();
st.pop();
st.push(a/b);
}
}
printf("%d",st.top());
return 0;
}
阳历1没过