#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
double plus( double a, double b )
{
	return a + b;
}
double minus( double a, double b )
{
	return a - b;
}
double product( double a, double b )
{
	return a * b;
}
double divide( double a, double b )
{
	return a / b;
}
double (*calculation[4])(double,double) = {plus, minus, product, divide};
void rpn( const char *t, double stack[], int *stack_ptr )
{
	char* strOperator[] = {"+","-","*","/"};
	int i;
	for( i = 0;i < 4;i++ ) if( strcmp( strOperator[i], t ) == 0 ) break;
	if( i != 4 ){
		(*stack_ptr)--;
		stack[*stack_ptr - 1] = ( *calculation[i] )( stack[*stack_ptr - 1], stack[*stack_ptr] );
	} else {
		stack[ (*stack_ptr)++ ] = atof( t );
	}
}
int main(void)
{
	char str[81],*t;
	double stack[81];
	int i,stack_ptr;
	while(1){
		for( i = 0;i < 81;i++ ){
			stack[i] = str[i] = 0;
		}
		std::cin.getline( str,81 );
		stack_ptr = 0;
		t = strtok( str, " " );
		rpn( t, stack, &stack_ptr );
		while( ( t = strtok( NULL, " ") ) != NULL ){
			rpn( t, stack, &stack_ptr );
		}
		printf("%f\n", stack[0] );
	}
	return 0;
}