#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.txt"

vector<string> split(const string &s, char delim) {
	vector<string> elems;
	stringstream ss(s);
	string item;
	while (getline(ss, item, delim)) {
		if (!item.empty()) {
			elems.push_back(item);
		}
	}
	return elems;
}

int main() {
	string st;
	while (getline(cin,st)) {
		vector<string>sts = split(st, ' ');
		stack<ld>sta;
		for (auto st : sts) {
			
			if (st == "-") {
				ld b = sta.top();
				sta.pop();
				ld a = sta.top();
				sta.pop();
				sta.push(a - b);
			}
			else if (st == "+") {
				ld b = sta.top();
				sta.pop();
				ld a = sta.top();
				sta.pop();
				sta.push(a + b);
			}
			else if (st == "/") {
				ld b = sta.top();
				sta.pop();
				ld a = sta.top();
				sta.pop(); 
				sta.push(a / b);
			}
			else if (st == "*") {
				ld b = sta.top();
				sta.pop();
				ld a = sta.top();
				sta.pop();
				sta.push(a * b);
			}
			else {
				sta.push(stold(st));
			}
		}
		cout <<setprecision(12)<<fixed<< sta.top() << endl;
	}
	return 0;
}