#include<iostream>
#include<cstdio>
using namespace std;
int pos;
char str[500];
double pre_calucate()
{
pos++;
if(str[pos]==' ') pos++;
if(str[pos]>='0'&&str[pos]<='9')
{
int len;
double temp;
sscanf(&str[pos],"%lf%n",&temp,&len);
pos+=len-1;
return temp;
}
if(str[pos]=='+') return pre_calucate()+pre_calucate();
if(str[pos]=='-') return pre_calucate()-pre_calucate();
if(str[pos]=='*') return pre_calucate()*pre_calucate();
if(str[pos]=='/') return pre_calucate()/pre_calucate();
}
int main()
{
while(gets(str))
{ pos=-1;
printf("%.2f\n",pre_calucate());
} return 0;
}