#include <iostream>
#include <stack>
#include <stdio.h>
#include <string>
#include <sstream>
#include <ctype.h>
using namespace std;

bool isdigit_str(string str){
	bool judge = true;
	for(int i=0;i<str.length();i++)
		if(!(isdigit(str[i])))
			judge = false;
	
	return judge;
}

double solve(double num1, double num2, string str){
	if(str == "+")
		return num1 + num2;
	else if(str == "-")
		return num1 - num2;
	else if(str == "*")
		return num1 * num2;
	else if(str == "/")
		return num1 / num2;
}

int main(){
	string str, str1;
	double num1, num2;

	while(1){
		stack<double> A;
		
		getline(cin, str);

		while(str != ""){
			istringstream is( str );
			is >> str1;

			if(isdigit_str(str1)){
				num1 = stod(str1);
				A.push(num1);
			}else{
				num2 = A.top();
				A.pop();
				num1 = A.top();
				A.pop(); 
				A.push(solve(num1, num2, str1));
			}
		
			str.erase(0,str1.length()+1);
		}

		cout<<A.top()<<endl;
	}

	return 0;
}