#define	_USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
using namespace std;
double cul(double a,double b,string e){
	double sum;
	if(e=="+")
		sum=a+b;
	else if(e=="-")
		sum=a-b;
	else if(e=="*")
		sum=a*b;
	else
		sum=a/b;
	
	return sum;
}
int main(){
	
	string s;
	
	while(getline(cin,s)){
		stack<double> 	st;
		string e="";
		for(int i=0;i<=s.size();i++){
			if(s[i]!=' '&&i!=s.size())
				e=e+s[i];
			else{
				if(e=="+"||e=="-"||e=="*"||e=="/"){
					double b=st.top();
					st.pop();
					double a=st.top();
					st.pop();
					st.push(cul(a,b,e));
				}
				else{
					st.push(stod(e));
				}
				e="";
				
			}
			
		}
			
		printf("%.6lf\n",st.top());

	}
	
}