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


int main(){
	string s,tmp;
	while(getline(cin,s)){
		stack<double>st;
		stringstream ss(s);
		while(ss>>tmp){
			if(tmp=="+"||tmp=="-"||tmp=="*"||tmp=="/"){
				double s1,s2;
				s2=st.top();
				st.pop();
				s1=st.top();
				st.pop();
				if(tmp=="+")st.push(s1+s2);
				if(tmp=="-")st.push(s1-s2);
				if(tmp=="*")st.push(s1*s2);
				if(tmp=="/")st.push(s1/s2);
			}
			else{
				st.push(atof(tmp.c_str()));
			}
		}
		printf("%.6lf\n",st.top());
	}
	
	return 0;
}
