#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <cstdlib>

using namespace std;

typedef float(*op)(float,float);

float add(float rh, float lh){ return rh + lh; }
float sub(float rh, float lh){ return rh - lh; }
float mul(float rh, float lh){ return rh * lh; }
float dev(float rh, float lh){ return rh / lh; }

int main(){
	string buf;
	while(getline(cin, buf)){
		stack<float> s;
		stringstream formula;
		formula << buf;
		string tmp;
		while(formula >> tmp){
			op proc = NULL;
			switch(tmp.c_str()[0]){
				case '+' :
					proc = add;
					break;
				case '-' :
					proc = sub;
					break;
				case '*' :
					proc = mul;
					break;
				case '/' :
					proc = dev;
					break;
				default:
					s.push(atof(tmp.c_str()));
			}
			if (proc != NULL){
				float b = s.top();
				s.pop();
				float a = s.top();
				s.pop();
				s.push(proc(a,b));
			}
		}
		cout << s.top() << endl;
	}
}