#include <iostream>
#include <cstdio>
#include <stack>
#include <cstdlib>

using namespace std;

int main() {
	char s[500];
	stack<double> S;
	while (scanf("%s", s) != EOF) {
		if (s[0] < '0' || s[0] > '9') {
			if (!S.empty()) {
				double r = S.top(); S.pop();
				double l = S.top(); S.pop();
				switch (s[0]) {
					case '+': l += r; break;
					case '-': l -= r; break;
					case '*': l *= r; break;
					case '/': l /= r; break;
				}
				S.push(l);
			}
		}
		else {
			S.push( (double)atoi(s) );
		}

		char c;
		if (scanf("%c", &c) == EOF || c != ' ') {
			if (!S.empty()) {
				printf("%.10f\n", S.top()); S.pop();
			}
		}
	}
}