#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef pair<double,double> P;
typedef complex<double> CP;
typedef long long ll;


string s;

int main(){
	while(getline(cin,s)){
		stack <double> st;
		rep(i,s.size()){
			//cout<<"size "<<s.size()<<endl;
			if(s[i]=='+'||s[i]=='-'||s[i]=='*'||s[i]=='/'){
				double a1,a2;
				a2=st.top();
				st.pop();
				a1=st.top();
				st.pop();
				if(s[i]=='+'){
					a1+=a2;
				}
				else if(s[i]=='-'){
					a1-=a2;
				}
				else if(s[i]=='*'){
					a1*=a2;
				}
				else if(s[i]=='/'){
					a1/=a2;
				}
				st.push(a1);
			}
			
			else if(s[i]<='9'&&s[i]>='0'){
				double sum=0.0;
				for(int j=i;j<s.size();j++){
					if(s[j]<='9'&&s[j]>='0'){
						sum*=10.0;
						sum+=s[j]-'0';
					}
					else break;
					i=j;
				}
				st.push(sum);
			}
			//cout<<"st.top = "<<st.top()<<endl;
			
		}
		printf("%.6f\n",st.top());
		
		st.pop();
	}
	return 0;
}