#include <bits/stdc++.h>
#define range(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define rep(i,n) range(i,0,n)
using namespace std;

int main(void){
	while(1){
		string s;
		getline(cin,s);
		if(cin.eof()) break;
		stringstream ss(s);
		vector<double> stk;
		while(1){
			if(ss.eof()) break;
			string n;
			ss >> n;
			if(n.size()==1&&!isdigit(n[0])){
				int b=stk.back();
				stk.pop_back();
				int a=stk.back();
				stk.pop_back();
				switch(n[0]){
					case '+':
						stk.push_back(a+b);
						break;
					case '-':
						stk.push_back(a-b);
						break;
					case '*':
						stk.push_back(a*b);
						break;
					case '/':
						stk.push_back(a/b);
						break;
				}
			}else{
				int num=stoi(n);
				stk.push_back(1.0*num);
			}
			//for(auto &i:stk) cout << i << endl;
		}
		cout.precision(10);
		cout << fixed << stk[0] << endl;
	}
	return 0;
}