#include <vector>
#include <string>
#include <iostream>
#include <algorithm>

#include <list>
#include <iterator>
#include <sstream>

using namespace std;


class Puzzle
{
public:


	void input()
	{

	}


	void play()
	{
		string str_in;
		stringstream ss;

		vector<string> v_in;
		string buf_in;

		while(getline(cin,str_in)){
			ss << str_in;
			while (ss >> buf_in) {
				v_in.push_back(buf_in);
			}

			/*
			for (auto s : v_in) {
				printf("%s ", s.c_str());
			}
			printf("\n");
			*/

			double ans = calc(v_in);
			printf("%f\n", ans);

			ss.str("");
			ss.clear();
			v_in.clear();
		}

	}

	double calc(vector<string> s_calc) {
		vector<double> st_num;
		vector<string> st_buf;
		double a, b;

		for (int ci = 0; ci < s_calc.size(); ci++) {
			if (s_calc[ci] == "*" || s_calc[ci] == "/" || s_calc[ci] == "+" || s_calc[ci] == "-") {
				b = st_num.back();
				st_num.pop_back();
				a = st_num.back();
				st_num.pop_back();
				if (s_calc[ci] == "*") st_num.push_back(a * b);
				if (s_calc[ci] == "/") st_num.push_back(a / b);
				if (s_calc[ci] == "+") st_num.push_back(a + b);
				if (s_calc[ci] == "-") st_num.push_back(a - b);
			}
			else {
				st_num.push_back(atof(s_calc[ci].c_str()));
			}
		}

		return st_num[0];
	}


};


int main()
{
	Puzzle puz;

	puz.input();
	puz.play();

    return 0;
}


