#include <iostream>
#include <sstream>
#include <stack>
#include <string>
#include <iomanip>

int calculate(std::string str);
double arithmetic(double, double, char);

int main()
{
	std::string str;
	
	while (std::getline(std::cin, str)) calculate(str);
	
	return 0;
}

int calculate(std::string str)
{
	std::stringstream ss(str);
	std::stack<double> st;
	std::string s;
	
	while (ss >> s) {
		switch (s.at(0)) {
		case '+':
		case '-':
		case '*':
		case '/':
			{
				double a = st.top();
				st.pop();
				double b = st.top();
				st.pop();
				st.push(arithmetic(b, a, s.at(0)));
				break;
			}
		default:
			{
				std::stringstream stod(s);
				double temp;
				stod >> temp;
				st.push(temp);
				break;
			}
		}
	}
	
	std::cout << std::setprecision(6) << std::setiosflags(std::ios::fixed) << st.top() << std::endl;
	
	return 0;
}

double arithmetic(double a, double b, char op)
{
	switch (op) {
	case '+':
		return a + b;
	case '-':
		return a - b;
	case '*':
		return a * b;
	case '/':
		if (b == 0.0) throw "0 devide";
		return a / b;
	default:
		throw "operator error";
	}
}