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

void Calc(stack<float>& StackNum, stack<string>& StackCh) {
    float last = StackNum.top(), result;
    StackNum.pop();
    float pre = StackNum.top();
    StackNum.pop();
    string opt = StackCh.top();
    StackCh.pop();
    if (opt == "+")
        result = pre + last;
    else if (opt == "-")
        result = pre - last;
    else if (opt == "*")
        result = pre * last;
    else
        result = pre / last;
    StackNum.push(result);
}
int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    stack<float> StackNum;
    stack<string> StackCh;
    string tstr,str;
    while (getline(cin, tstr) && atoi(tstr.c_str())) {
        for (int i = 0; i < tstr.size();) {
            if (tstr[i] != ' ') {
                int tt = tstr.find(' ',i);
                str = tstr.substr(i,tt - i);
                if (tt != -1)
                    i = tt + 1;
                else
                    i = tstr.size();
                if (str == "*" || str == "/") {
                    if (StackCh.empty() || StackCh.top() == "+" || StackCh.top() == "-")
                        StackCh.push(str);
                    //进行计算
                    else {
                        Calc(StackNum, StackCh);
                        i = i - 2;
                    }
                }
                else if (str == "+" || str == "-")
                    if (StackCh.empty())
                        StackCh.push(str);
                //进行计算
                    else {
                        Calc(StackNum, StackCh);
                        i = i - 2;
                    }
                //存入数值
                else
                    StackNum.push(atof(str.c_str()));
            }
        }
        while (!StackCh.empty()) {
            Calc(StackNum, StackCh);
        }
        printf("%.2f\n",StackNum.top());
        StackNum.pop();
    }
}