#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
using namespace std;

#define SAFE_DELETE( x ) { if ( x ){ delete x; x = NULL; } }

struct tCell{
	tCell() : x( 0.0 ), prev( NULL ), next( NULL ){}

	double x;
	tCell *prev, *next;
};

class MyArray{
public:
	MyArray() : mSize( 0 ), head( NULL ), tail( NULL ){
		head = new tCell;
		tail = new tCell;
		head->next = tail;
		tail->prev = head;
	}
	~MyArray(){
		for ( int i = mSize; i > 0; --i ){
			tCell* it = tail->prev;
			it->prev->next = it->next;
			it->next->prev = it->prev;
			SAFE_DELETE( it );
		}
		mSize = 0;
		SAFE_DELETE( tail );
		SAFE_DELETE( head );
	}

	void push( int x ){
		tCell* it = new tCell;
		it->x = x;
		it->prev = tail->prev;
		it->next = tail;
		it->prev->next = it;
		it->next->prev = it;
		++mSize;
	}
	double pop(){
		tCell* it = tail->prev;
		double ret = it->x;
		it->prev->next = it->next;
		it->next->prev = it->prev;
		SAFE_DELETE( it );
		--mSize;
		return ret;
	}
	double& ref(){
		return tail->prev->x;
	}

private:
	int mSize;
	tCell *head, * tail;
};

int getFigure( string& s ){
	bool minus = false;
	int ret = 0;
	if ( s[ 0 ] == '-' ){
		minus = true;
		s.erase( 0, 1 );
	}
	while ( s[ 0 ] >= '0' && s[ 0 ] <= '9' ){
		ret = ret * 10 + static_cast< int >( s[ 0 ] - '0' );
		s.erase( 0, 1 );
	}
	s.erase( 0, 1 );

	return minus ? -ret : ret;
}

int main(){
	string s;

	while ( getline( cin, s ) ){
		MyArray* stack = new MyArray();
		while( s.size() ){
			if ( ( s[ 0 ] >= '0' && s[ 0 ] <= '9' ) ||
				 ( s[ 0 ] == '-' && s[ 1 ] >= '0' && s[ 1 ] <= '9' ) ){
				stack->push( getFigure( s ) );
			}else{
				double t = stack->pop();
				switch ( s[ 0 ] ){
					case '+': stack->ref() += t; break;
					case '-': stack->ref() -= t; break;
					case '*': stack->ref() *= t; break;
					case '/': stack->ref() /= t; break;
					default : break;
				}
				s.erase( 0, 2 );
			}
		}

		cout << setprecision( 6 ) << setiosflags( ios::fixed );
		cout << stack->ref() << endl;

		delete stack;
	}

	return 0;
}