#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
double readnumber(char f[],int *i){
double x=0.0;
int k=0;
while(f[*i]>='0'&&f[i]<'9'){
x=x*10+(f[*i-'0']);
(*i)++;
}
if(f[*i]=='.'){
(*i)++;
while(f[*i]>='0'&&f[i]<'9'){
x=x*10+(f[*i-'0']);
(*i)++;
k++;
}
}
while(k!=0){
x=x/10.0;
k--;
}
return(x);
}
double evalpost(char f[]){
double obst[100];
int top,i;
double x1,x2;
while(f[i]!='#'){
if(f[i]>='0'&&f[i]<'9'){
obst[top]=readnumber(f,&i);top++;
}
else if(f[i]==' ') i++;
else if(f[i]=='+'){
x2=obst[--top];
x1=obst[--top];
obst[top]=x1+x2;top++;
i++;
}
else if(f[i]=='-'){
x2=obst[--top];
x1=obst[--top];
obst[top]=x1-x2;top++;
i++;
}
else if(f[i]==''){
x2=obst[--top];
x1=obst[--top];
obst[top]=x1x2;top++;
i++;
}
else if(f[i]=='/'){
x2=obst[--top];
x1=obst[--top];
obst[top]=x1/x2;top++;
i++;
}
}
return obst[0];
}
int main(int argc, char *argv[]) {
char a[100];
scanf("%c%c",a);
int m=evalpost(a[100]);
printf("%lf",m);
return 0;
}