#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;
using P = pair< ll, ll >;

vector<string> split(const string &ij, char c=' ') {
    stringstream ss(ij);
    string str;
    vector<string> res;
    while (getline(ss, str, c)) {
        if (str.size()) {
            res.push_back(str);
        }
    }
    return res;
}

int main() {
    stack<string> s;
    string str;
    while (getline(cin, str)) {
        vector<string> t = split(str);
        stack<double> s;
        rep(i, t.size()) {
            cout << t[i] << endl;
            if (t[i] == "+" or t[i] == "-" or t[i] == "*" or t[i] == "/") {
                double b = s.top(); s.pop();
                double a = s.top(); s.pop();

                if (t[i] == "+") s.push(a+b);
                else if (t[i] == "-") s.push(a-b);
                else if (t[i] == "*") s.push(a*b);
                else if (t[i] == "/") s.push(a/b);

            }
            else {
                s.push(stof(t[i]));
            }
        }
        printf("%.10f\n", s.top());
    }
}