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

using namespace std;

vector<string> split(string src, char delim) {
	istringstream ss(src);
	string s;
	vector<string> ret;
	while (getline(ss, s, delim))
		ret.push_back(s);
	return ret;
}

int main() {
	string str;
	while (getline(cin, str)) {
		stack<double> s;
		for (const string& t : split(str, ' ')) {
			cout << t << endl;
			if (t == "+") {
				double op1 = s.top(); s.pop();
				double op2 = s.top(); s.pop();
				double ans = op2 + op1;
				s.push(ans);
			}
			else if (t == "-") {
				double op1 = s.top(); s.pop();
				double op2 = s.top(); s.pop();
				double ans = op2 - op1;
				s.push(ans);
			}
			else if (t == "*") {
				double op1 = s.top(); s.pop();
				double op2 = s.top(); s.pop();
				double ans = op2 * op1;
				s.push(ans);
			}
			else if (t == "/") {
				double op1 = s.top(); s.pop();
				double op2 = s.top(); s.pop();
				double ans = op2 / op1;
				s.push(ans);
			}
			else {
				s.push(atoi(t.c_str()));
			}
		}
		cout << fixed << setprecision(6) << s.top() << endl;
		s.pop();
	}
	return 0;
}