#include <cstdio>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <stack>
using namespace std;

double eval(double a, double b, char oper){
    if( oper == '+' ) return a + b;
    if( oper == '-' ) return a - b;
    if( oper == '*' ) return a * b;
    if( oper == '/' ) return a / b;
    return 0.0;
}

int main(){
    char expr[200];
    char* it;
    while( fgets(expr, 200, stdin) ){
        stack<double> stk;
        it = strtok(expr, " ");
        stk.push( (double)atoi(it) );
        while( true ){
            it = strtok(NULL, " ");
            if( it == NULL ) break;
            if( isdigit( *it ) ){
                stk.push( (double)atoi(it) );
            }else{
                int a, b;
                a = stk.top();
                stk.pop();
                b = stk.top();
                stk.pop();
                stk.push( eval(b, a, *it) );
            }
        }
        printf("%lf\n", stk.top() );
    }
    return 0;
}