#include <cstdlib>
#include <iostream>
#include <sstream>
#include <stack>
#include <string>
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;
				if (stack.empty() == true) {
					break;
				}
				else {
					b = stack.top();
					stack.pop();
				}
				if (stack.empty() == true) {
					break;
				}
				else {
					a = stack.top();
					stack.pop();
				}
				switch (string.front()) {
				case '+':
					stack.push(a + b);
					break;
				case '-':
					stack.push(a - b);
					break;
				case '*':
					stack.push(a * b);
					break;
				case '/':
					if (b == 0) {
						while (stack.empty() == false) {
							stack.pop();
						}
						break;
					}
					stack.push(a / b);
					break;
				}
			}
		}
		if (stack.empty() == true) {
			std::cout << "ERROR" << std::endl;
		}
		else {
			std::cout << stack.top() << std::endl;
		}
	}
	return EXIT_SUCCESS;
}