#include <iostream>
#include <iomanip>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <sstream>

using namespace std;

int main() {
	string str, s, item;
	while (getline(cin, str)) {
		stack<double> num;
		stringstream ss(str);
		while (getline(ss, item, ' ')) {
			if (item.empty())
				break;
			if (isdigit(item[0]))
				num.push(stod(item));
			else {
				double a = num.top(); num.pop();
				double b = num.top(); num.pop();
				double c;
				if (item == "+")
					c = b + a;
				else if (item == "-")
					c = b - a;
				else if (item == "*")
					c = b * a;
				else if (item == "/")
					c = b / a;

				num.push(c);
			}
		}
		cout << fixed << setprecision(6) << num.top() << endl;
	}
	return 0;
}