#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stack>
#include <sstream>
using namespace std;
int main(void){

    string str;
    while(getline(cin,str)){
        double ans = 0;
        stack<double> s;
        stringstream ss(str);
        string tmp;
        while(ss>>tmp){
            stringstream s1(tmp);
            stringstream s2(tmp);
            int n;
            char c;
            if(s1>>n){
                s.push(n);
            }
            else if(s2>>c){

                double y = s.top();
                s.pop();
                double x = s.top();
                s.pop();
                if(c=='+'){
                    s.push(x+y);
                }
                else if(c=='-'){
                    s.push(x-y);
                }
                else if(c=='*'){
                    s.push(x*y);
                }
                else if(c=='/'){
                    s.push(x/y);
                }

            }

        }
        ans = s.top();
        s.pop();
        printf("%.6lf\n",ans);
    }

    return 0;
}