#include <iostream>
#include <vector>
#include <string>
#include <iomanip>
#include <regex>
using namespace std;

std::vector<std::string> split(const std::string &s, std::regex delim) {
    std::vector<std::string> res;
    std::sregex_token_iterator itr(s.begin(), s.end(), delim, -1), end;
    for(; itr!=end; itr++){
        if(*itr != "") res.push_back(*itr);
    }
    return res;
}

int main(){
    string s;
    while(getline(cin, s)){
        vector<string> v = split(s, regex{" "});
        vector<double> nums;
        for(int i=0; i<(int)v.size(); i++){
            if(v[i]=="+" || v[i]=="-" || v[i]=="*" || v[i]=="/"){
                double b = nums.back();
                nums.pop_back();
                double a = nums.back();
                nums.pop_back();
                if(v[i]=="+") nums.push_back(a+b);
                if(v[i]=="-") nums.push_back(a-b);
                if(v[i]=="*") nums.push_back(a*b);
                if(v[i]=="/") nums.push_back(a/b);
            }else{
                nums.push_back(stoi(v[i]));
            }
        }
        cout << fixed;
        cout << setprecision(10);
        cout << nums[0] << endl;
    }
    return 0;
}

