#include <iostream>
#include <iomanip>
#include <vector>
#include <sstream>
#include <string>
using namespace std;

bool is_operator(string s) {
    return (s == "+" || s == "-" || s == "*" || s == "/");
}

double to_f(string s) {
    double f; istringstream iss(s);
    iss >> f;
    return f;
}

int main() {
    string s;
    vector<double> st;
    while (getline(cin, s)) {
        st.clear();
        istringstream iss(s);
        string t; 
        while (iss >> t) {
            if (is_operator(t)) {
                double a = st.back(); st.pop_back();
                double b = st.back(); st.pop_back();
                if (t == "+") {
                    st.push_back(a+b);
                } else if (t == "-") {
                    st.push_back(b-a);
                } else if (t == "*") {
                    st.push_back(a*b);
                } else if (t == "/") {
                    st.push_back(b/a);
                }
            } else {
                st.push_back(to_f(t));
            }
        }
        cout << fixed << setprecision(6) << st.back() << endl;
    }
    return 0;
}