#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int main() {
	string buf;
	while (getline(cin, buf)) {
		stack<double>st;
		stringstream ss(buf);
		string c;
		while (ss >> c) {
			if (c == "+" || c == "-" || c == "*" || c == "/") {
				double a = st.top(); st.pop();
				double b = st.top(); st.pop();
				if (c == "+")st.push(b + a);
				else if (c[0] == '-')st.push(b - a);
				else if (c[0] == '*')st.push(b*a);
				else st.push(b / a);
			}
			else st.push(stod(c));
		}
		printf("%.6lf\n", st.top());
	}
}