#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cmath>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

typedef long long ll;

#define ITER( c ) __typeof( c ).begin()
#define REP( i, m, n ) for ( int i = m; i < n; i++ )
#define UREP( i, m, n ) for ( unsigned int i = m; i < n; i++ )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) c.begin(), c.end()
#define PB( n ) push_back( n );
#define MP( a, b ) make_pair( a, b )
#define fst first
#define snd second

int main()
{
	stack<double> st;

	string line;

	while ( getline( cin, line ) )
	{
		string buffer;
		istringstream iss( line );

		while ( iss >> buffer )
		{
			if ( isdigit( buffer[0] ) )
			{
				st.push( atoi( buffer.c_str() ) );
			}
			else
			{
				double ope1, ope2;

				ope2 = st.top();
				st.pop();
				ope1 = st.top();
				st.pop();

				if ( buffer == "+" )
				{
					st.push( ope1 + ope2 );
				}
				else if ( buffer == "-" )
				{
					st.push( ope1 - ope2 );
				}
				else if ( buffer == "*" )
				{
					st.push( ope1 * ope2 );
				}
				else
				{
					st.push( ope1 / ope2 );
				}
			}
		}

		printf("%.6lf\n", st.top() );
	}

	return 0;
}