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

int main()
{
	std::string s;
	while(std::getline(std::cin,s)){
		std::stack<double> stack;
		std::stringstream ss(s);
		while(ss >> s){
			if('0' <= s[0] && s[0] <= '9'){
				stack.push(std::stoi(s));
			} else {
				auto x1 = stack.top(); stack.pop();
				auto x2 = stack.top(); stack.pop();
			
				switch(s[0]){
					case '+':
						stack.push(x2 + x1);
						break;
					case '-':
						stack.push(x2 - x1);
						break;
					case '*':
						stack.push(x2 * x1);
						break;
					case '/':
						stack.push(x2 / x1);
						break;
				}
			}
		}
		//std::cout << stack.top() << std::endl;
		std::printf("%.6f\n",stack.top());
	}
}