#include<iostream>
#include<vector>
#include<stdio.h>
#include<string>
using namespace std;

int main(){
    string s,str;
    string::size_type sz;
    while(getline(cin,str)){
        vector<string>vec;
        vector<double>v;
        s="";
        for(int i=0;i<str.length();i++){
            while((str[i]!=' '&&i<str.length())||(i<str.length()-1&&str[i]=='-'&&str[i+1]>='0'&&str[i]<='9')){
                s=s+str[i];
                i++;
            }
            vec.push_back(s);
            s="";
        }
        vec.push_back(s);
        double a,b,t;
        for(int i=0;i<vec.size();i++){
            if(vec[i].length()==1&&(vec[i][0]<'0'||vec[i][0]>'9')){
                a=v[v.size()-2];
                b=v[v.size()-1];
                if(vec[i][0]=='+')
                    t=a+b;
                if(vec[i][0]=='-')
                    t=a-b;
                if(vec[i][0]=='*')
                    t=a*b;
                if(vec[i][0]=='/')
                    t=a/b;
                v.pop_back();
                v.pop_back();
                v.push_back(t);
            }
            else{
                v.push_back(atof(vec[i].c_str()));
                
            }
        }
        printf("%.6f\n",v[0]);
    }
}