#include <bits/stdc++.h>
using namespace std;

bool is_number(string const& s) {
    bool res = false;
    for(auto c : s) {
        res |= isdigit(c);
    }
    return res;
}

int main() {
    cout << fixed << setprecision(10);
    string line;
    while(getline(cin, line)) {
        stack<double> st;
        string s;
        stringstream ss(line);
        while(ss >> s) {
            if(is_number(s)) {
                st.push(stoi(s));
            } else {
                double op1 = st.top(); st.pop();
                double op2 = st.top(); st.pop();
                if(s[0] == '+') {
                    st.push(op2 + op1);
                } else if(s[0] == '-') {
                    st.push(op2 - op1);
                } else if(s[0] == '/') {
                    st.push(op2 / op1);
                } else if(s[0] == '*') {
                    st.push(op2 * op1);
                }
            }
        }
        cout << st.top() << endl;
    }
}
