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

#define PRECISE "6"
#define BUF_SIZ 1024

using namespace std;

double CalcDoctorNewExpression(string &exp){
	stack<double> st;

	for(unsigned int i = 0; i < exp.length(); i++){
		double v1, v2, v;
		int sign = 1;

		if( exp[i] == ' ' ) continue;
		if( i+1 < exp.length() && exp[i] == '-' && isdigit(exp[i + 1]) ){ sign = -1; i++; goto PARSE_NUMBER; }

		switch( exp[i] ){
			case '+': case '-': case '*': case '/':
				v1 = st.top(); st.pop();
				v2 = st.top(); st.pop();
				switch( exp[i] ){
					case '+': v = v1 + v2; break;
					case '-': v = v2 - v1; break;
					case '*': v = v1 * v2; break;
					case '/': v = v2 / v1; break;
				}
				st.push( v );
				continue;
		}

PARSE_NUMBER:;		
		if( isdigit(exp[i]) ){
			double num = 0;
			do{
				num *= 10.0;
				num += (double)(exp[i] - '0');
				++i;
			}while( i < exp.length() && isdigit(exp[i]) );
			st.push( sign * num );
		}
	}
	return st.top();
}

int main(void){
	while( true ){
		char buf[BUF_SIZ];
		string s;

		cin.getline( buf, sizeof(buf)/sizeof(*buf) );
		if( cin.eof() ) break;

		s = buf;
		printf("%."PRECISE"f\n", CalcDoctorNewExpression( s ));
	}
	return 0;
}