#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstdlib>
#include <stack>
#include <cstdio>

using namespace std;

int main()
{
    string str;
    double a, b;
    while(getline(cin, str)){
        stack<double> num;
        stringstream ss(str);
        string tmp;
        while(ss>>tmp)
        {
            if(tmp=="+"||tmp=="-"||tmp=="*"||tmp=="/")
            {
                b = num.top();
                num.pop();
                a = num.top();
                num.pop();
                if(tmp=="+") num.push(a+b);
                else if(tmp=="-") num.push(a-b);
                else if(tmp=="*") num.push(a*b);
                else num.push(a/b);
            }
            else num.push(atof(tmp.c_str()));
        }
        printf("%.6f\n",num.top());
    }
}