#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	string str;
	stack<double> num;
	while(getline(cin,str)){
		int i;
		for(i=0;i<str.size()-1;){
			if('0'<=str[i]&&str[i]<='9'){
				double d=0;
				while('0'<=str[i]&&str[i]<='9'){
					d=d*10+str[i]-'0';
					i++;
				}
				num.push(d);
				
				//cout<<d<<endl;
			}else if(str[i]!=' '&&str[i]!='\n'){
			//cout<<str[i]<<endl;
				double a,b;
				a=num.top();
				num.pop();
				b=num.top();
				num.pop();
				if(str[i]=='+')num.push(a+b);
				if(str[i]=='-')num.push(b-a);
				if(str[i]=='*')num.push(a*b);
				if(str[i]=='/')num.push(b/a);
				i++;
				//cout<<num.top()<<endl;
			}else i++;
		}
		cout<<num.top()<<endl;
		num.pop();
	}
	return 0;
}