#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	string s;
	while(getline(cin,s)){
		vector<double>in;
		rep(i,s.size()){
			if(isdigit(s[i])){
				double d=0;
				while(isdigit(s[i])){
					d*=10;
					d+=s[i]-'0';
					i++;
					if(s.size()==i)break;
				}
				in.pb(d);
			}else{
				int q=in.size();
				double a=in[q-2],b=in[q-1];
				in.pop_back();in.pop_back();
				if(s[i]=='+')in.pb(a+b);
				if(s[i]=='-')in.pb(a-b);
				if(s[i]=='*')in.pb(a*b);
				if(s[i]=='/')in.pb(a/b);
				i++;
			}
		}
		printf("%.9f\n",in[0]);
	}
}