#include <stdio.h>
#include <string.h>
#include <stack>
#include <stdlib.h>
using namespace std;
char str[210];
int i;
double getNum(int x)
{
double t=0;
for(;str[x]!=' '&&str[x]!=0;++x)
{
t*=10;
t+=(double)(str[x]-'0');
}
i=x;
return t;
}
int main()
{
double temp,t1,t2,ans=0;
stack<char> op,reop;
stack<double> data,redata;
// freopen("in.txt","r",stdin);
while (gets(str))
{
if (str[0]=='0'&&str[1]==0) break;
for (i=0;i<strlen(str);++i)
{
t1=0;t2=0;temp=0;
if(str[i]==' ')
continue;
else if (str[i]=='+'||str[i]=='-')
op.push(str[i]);
else if(str[i]=='/')
{
i+=2;
t1=data.top();
data.pop();
ans=t1/getNum(i);
data.push(ans);
}
else if(str[i]=='*')
{
i+=2;
t1=data.top();
data.pop();
ans=t1*getNum(i);
data.push(ans);
}
else
data.push(getNum(i));
}
while (!op.empty())
{
reop.push(op.top());
op.pop();
}
while (!data.empty())
{
redata.push(data.top());
data.pop();
}
while (!reop.empty())
{
t1=redata.top();
redata.pop();
t2=redata.top();
redata.pop();
if (reop.top()=='-')
ans=t1-t2;
if (reop.top()=='+')
ans=t1+t2;
reop.pop();
redata.push(ans);
}
printf("%.2lf\n",ans);
}
return 0;
}