#include <bits/stdc++.h>

using namespace std;

int main ()
{
	string s;
	while( getline ( cin , s ) )
	{
		stringstream ss;
		ss << s;
		string x;
		vector<double>data;
		while( ss >> x )
		{
			if( x == "+" )
			{
				int a , b;
				a = *data.rbegin (); data.pop_back ();
				b = *data.rbegin (); data.pop_back ();
				data.push_back ( b + a );
				continue;
			} else if( x == "-" )
			{
				int a , b;
				a = *data.rbegin (); data.pop_back ();
				b = *data.rbegin (); data.pop_back ();
				data.push_back ( b - a );
				continue;
			} else if( x == "*" )
			{
				int a , b;
				a = *data.rbegin (); data.pop_back ();
				b = *data.rbegin (); data.pop_back ();
				data.push_back ( b * a );
				continue;
			} else if( x == "/" )
			{
				int a , b;
				a = *data.rbegin (); data.pop_back ();
				b = *data.rbegin (); data.pop_back ();
				data.push_back ( b / a );
				continue;
			} else
			{
				data.push_back ( stod ( x ) );
			}
		}
		cout << fixed << setprecision ( 10 ) << *data.rbegin () << endl;
	}
}