#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <sstream>
 
#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	int n;
	std::string buf;


#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(std::getline(ifs, buf)){
#else
	while(std::getline(std::cin, buf)){
#endif
		std::istringstream stream(buf);
		std::vector<double> stack;
		while(std::getline(stream, buf, ' ')){
			if(buf == "+"){
				double t = stack[stack.size() - 2] + stack.back();
				stack.pop_back();
				stack.pop_back();
				stack.push_back(t);
			}
			else if(buf == "-"){
				double t = stack[stack.size() - 2] - stack.back();
				stack.pop_back();
				stack.pop_back();
				stack.push_back(t);
			}
			else if(buf == "*"){
				double t = stack[stack.size() - 2] * stack.back();
				stack.pop_back();
				stack.pop_back();
				stack.push_back(t);
			}
			else if(buf == "/"){
				double t = stack[stack.size() - 2] / stack.back();
				stack.pop_back();
				stack.pop_back();
				stack.push_back(t);
			}
			else{
				n = stoi(buf);
				stack.push_back(n);
			}
		}
		printf("%.6lf\n", stack[0]);
	}


 
#if INPUT_FROM_FILE
	//fclose(fp);
#endif
    return 0;
}
