#include<iostream>
#include<stack>
#include<string>
#include<sstream> 
#include<cstdlib>
 
using namespace std;
 
int main()
{
double n;          
stack<double> stk; 
string str,t;    
 
while(getline(cin,str)){ 
while(stk.empty()==0){   
       stk.pop();  
        }
        n=0;       
 
        stringstream mozi(str); 
         
        while(mozi>>t){            
            if(t=="+"||t=="-"||t=="*"||t=="/"){
                double s1, s2;
                 
				 
                s2 = stk.top();
                stk.pop();
 
                s1 = stk.top();
                stk.pop();
 
 
                     if (t=="+"){
                    stk.push(s1 + s2);
                }
                else if (t=="-"){
                    stk.push(s1 - s2);
                }
                else if (t=="*"){
                    stk.push(s1 * s2);
                }
                else if (t=="/"){
                    stk.push(s1 / s2);
                }
                }
                else{
                stk.push(atof(t.c_str()));
                }
                }
                printf("%.6lf\n",stk.top());
                }
 
                return 0;
                }