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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define ALLC(v) v.cbegin(), v.cend()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    string s;
    while (getline(cin, s))
    {
        stack<double> st;
        stringstream ss(s);
        double a, b;
        while (ss >> s)
        {
            if (s == "+" || s == "-" || s == "*" || s == "/")
            {
                a = st.top();
                st.pop();
                b = st.top();
                st.pop();
                if (s == "+")
                    st.push(a + b);
                else if (s == "-")
                    st.push(b - a);
                else if (s == "*")
                    st.push(a * b);
                else if (s == "/")
                    st.push(b / a);
            }
            else
                st.push(stod(s));
        }
        printf("%.7f\n", st.top());
    }
    return 0;
}
