#include <iostream>
#include <string>
#include <stack>
#include <cstdio>
using namespace std;

int main(){
	string s;
	stack<double> st;
	while(cin >> s){
		if(s == "+" || s == "-" || s == "*" || s == "/"){
			double a,b;
			a = st.top();
			st.pop();
			b = st.top();
			st.pop();
			if(s == "+") st.push(b + a);
			else if(s == "-") st.push(b - a);
			else if(s == "*") st.push(b * a);
			else if(s == "/") st.push(b / a);
		}
		else st.push(stoi(s));
		if(getchar() == '\n'){
			cout << st.top() << endl;
			st.pop();
		}
	}
	return 0;
}