#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>
  
using namespace std;
  
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


int main(){
	while(1){
		string str;
		getline(cin,str);
		
		if(cin.eof())break;
		
		
		vector<bool> isnum;
		rep(i,str.size()){
			if(i==0 || str[i-1]==' '){
				char c = str[i];
				if(c>='0' && c<='9')isnum.push_back(true);
				else isnum.push_back(false);
			}
		}
		
		
		
		stringstream sst;
		sst<<str;
		
		stack<double> t;
		rep(i,isnum.size()){
			if(isnum[i]){
				int a;
				sst>>a;
				t.push((double)a);
				
			}else{
				char c;
				sst>>c;
				
				double b = t.top();t.pop();
				double a = t.top();t.pop();
				
				if(c=='*'){
					t.push(a*b);	
				}
				if(c=='+'){
					
					t.push(a+b);
				}
				if(c=='-'){
					
					t.push(a-b);
				}
				if(c=='/'){
					
					t.push(a/b);
				}
			}
		}
		
		printf("%.8lf\n",t.top());
	}
	
}