#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <cstdlib>

int main()
{
	std::string buf;
	while (std::getline(std::cin, buf)) {
		std::vector<std::string> vec;
		
		int offset = std::string::size_type(0);
		while (true) {
			int sp_pos = buf.find(" ", offset);
			if (sp_pos == std::string::npos) {
				//std::cout << "npos" << std::endl;
				vec.push_back( buf.substr(offset) );
				break;
			} else {
				//std::cout << "not npos" << std::endl;
				vec.push_back( buf.substr(offset, sp_pos - offset) );
				offset = sp_pos + std::string::size_type(1);
			}
		}
		
		//std::cout << "vec : ";
		//for (std::vector<std::string>::iterator it = vec.begin(); it != vec.end(); ++it) std::cout << (*it) << " ";
		//std::cout << std::endl;
		
		std::stack<std::string> st;
		
		for ( std::vector<std::string>::iterator it = vec.begin(); it != vec.end(); ++it) {
			std::string item = (*it);
			if (item.length() == 1) { // item is either an operator or a number
				if (item[0] == '+') {
					double x = std::stod(st.top()); st.pop();
					double y = std::stod(st.top()); st.pop();
					st.push( std::to_string(y+x) );
				} else if (item[0] == '-') {
					double x = std::stod(st.top()); st.pop();
					double y = std::stod(st.top()); st.pop();
					st.push( std::to_string(y-x) );
				} else if (item[0] == '*') {
					double x = std::stod(st.top()); st.pop();
					double y = std::stod(st.top()); st.pop();
					st.push( std::to_string(y*x) );
				} else if (item[0] == '/') {
					double x = std::stod(st.top()); st.pop();
					double y = std::stod(st.top()); st.pop();
					st.push( std::to_string(y/x) );
				} else { // number
					st.push(item);
				}
			} else { // item is a number
				st.push(item);
			}
		}
		
		std::cout << std::fixed << std::stod( st.top() ) << std::endl;
	}
	
	return 0;
}
			

