#include <iostream>
#include <cstdio>
#include <stack>
#include <string>
#include <cstring>
#include <cstdlib>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	char str[80+4];
	while(gets(str) != NULL) {
		stack<double> s;
		string t;
		int len = strlen(str);
		rep(i,len) {
			if(str[i] == ' ') {
				if(isdigit(t[0])) {
					double n = atof(t.c_str());
					s.push(n);
				} else {
					if(t == "+") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = a + b;
						s.push(c);
					}
					if(t == "-") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = b - a;
						s.push(c);
					}
					if(t == "*") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = a * b;
						s.push(c);
					}
					if(t == "/") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = b / a;
						s.push(c);
					}
				}
				t = "";
			} else {
				t += str[i];
			}
		}
		double a = s.top(); s.pop();
		double b = s.top(); s.pop();
		if(t == "+") printf("%.6lf\n", a + b);
		else if(t == "-") printf("%.6lf\n", b - a);
		else if(t == "*") printf("%.6lf\n", a * b);
		else printf("%.6lf\n", b / a);
	}
	return 0;
}