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

double dbl(string s) {
    stringstream ss(s);
    double ret;
    ss >> ret;
    return ret;
}

string calc(string sa, string sb, string op) {
    double a, b;
    a = dbl(sa);
    b = dbl(sb);
    stringstream ret;
    if (op == "+") {
        ret << a + b;
    } else if (op == "-") {
        ret << a - b;
    } else if (op == "*") {
        ret << a * b;
    } else if (op == "/") {
        ret << a / b;
    }
    return ret.str();
}

int main() {
    string line;
    while (getline(cin, line)) {
        stringstream ss(line);
        stack<string> stk;
        string s;
        while (ss >> s) {
            if (isdigit(s.back())) {
                stk.push(s);
            } else {
                string b = stk.top(); stk.pop();
                string a = stk.top(); stk.pop();
                stk.push(calc(a, b, s));
            }
        }
        cout.precision(6);
        cout << fixed << dbl(stk.top()) << endl;
    }
    return 0;
}