#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <cstdlib>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

vector<string> split(string &str,char delim)
{
	vector<string> res;
	size_t current = 0,found;
	while((found = str.find_first_of(delim,current)) != string::npos)
	{
		res.push_back(string(str,current,found  - current));
		current = found + 1;
	}
	res.push_back(string(str,current,str.size() - current));
	return res;
}

int main()
{
	string s;
	while(getline(cin,s))
	{
		double ans;
		stack<double> res;
		vector<string> _s = split(s,' ');
		rep(i,_s.size())
		{
			if(_s[i] == "+")
			{
				double temp = res.top();
				res.pop();
				double temp2 = res.top();
				res.pop();
				res.push(temp2 + temp);
			}
			else if(_s[i] == "-")
			{
				double temp = res.top();
				res.pop();
				double temp2 = res.top();
				res.pop();
				res.push(temp2 - temp);
			}
			else if(_s[i] == "*")
			{
				double temp = res.top();
				res.pop();
				double temp2 = res.top();
				res.pop();
				res.push(temp2 * temp);
			}
			else if(_s[i] == "/")
			{
				double temp = res.top();
				res.pop();
				double temp2 = res.top();
				res.pop();
				res.push(temp2 / temp);
			}
			else
			{
				res.push(atof(_s[i].c_str()));
			}
		}

		cout << fixed;
		cout.precision(6);
		cout << res.top() << endl;
	}
	return 0;
}