#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<cctype>
#include<cstdlib>
#include<sstream>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)

double strongPushBack(vector<double> &v){
    int ret = v[v.size() - 1];
    v.pop_back();
    return ret;
}

void cal(vector<double> &v, string op){
    int right = strongPushBack(v);
    int left = strongPushBack(v);
    if(op == "+") v.push_back(left + right);
    if(op == "-") v.push_back(left - right);
    if(op == "*") v.push_back(left * right);
    if(op == "/") v.push_back(left / right);
}

int main(){
    string str;
    while(getline(cin, str)){
        stringstream ss(str);
        vector<double> v;
        while(ss >>str){
            if(isdigit(str[0])) v.push_back( (double)(atoi(str.c_str())) );
            else cal(v, str);
        }
        printf("%.7lf\n", v[0]);
    }
    return 0;
}