#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

double stod (string s )
{
	stringstream ss (s );
	double res;
	ss >> res;

	return res;
}

double Reverse_Polish_Natation (string t )
{
	stringstream ss (t );
	string s = "";
	stack<double> st;
	while (ss >> s ){
		if (isdigit (s[0] ) || (s[0] == '-' && s.length() > 1 && isdigit (s[1] ) ) ){
			st.push (stod (s ) );
		}else{
			double b = st.top(); st.pop();
			double a = st.top(); st.pop();
			double c = 0.0;
			char ope = s[0];
			switch (ope ){
				case '+': c = a + b; break;
				case '-': c = a - b; break;
				case '*': c = a * b; break;
				case '/': c = a / b; break;
			} // end switch
			st.push (c );
		} // end if
	} // end while

	double res = st.top();

	return res;
}

int main()
{
//	cut here before submit 
//	freopen ("testcase.SME", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		double res = Reverse_Polish_Natation (str );
		printf ("%.9lf\n", res );
	} // end loop
		
	return 0;
}