#include <cstdlib>
#include <iostream>
#include <sstream>
#include <stack>
int main() {
	std::string string;
	while (std::getline(std::cin, string)) {
		std::stack<double> stack;
		std::stringstream stringstream;
		if (string.empty() == true) {
			break;
		}
		else {
			stringstream << string;
		}
		while (stringstream >> string) {
			if (isdigit(*string.rbegin())) {
				stack.push(atof(string.c_str()));
			}
			else {
				double a, b, result = 0;
				b = stack.top();
				stack.pop();
				a = stack.top();
				stack.pop();
				switch (string.front()) {
				case '+':
					result = a + b;
					break;
				case '-':
					result = a - b;
					break;
				case '*':
					result = a * b;
					break;
				case '/':
					result = a / b;
					break;
				}
				stack.push(result);
			}
		}
		std::cout << stack.top() << std::endl;
	}
	return EXIT_SUCCESS;
}