#include <bits/stdc++.h>

using namespace std;

int main()
{
	string str;
	while(getline(cin , str))
	{
		stringstream ss;
		ss << str;
		string s;
		stack<long double>data;
		while(ss >> s)
		{
			if(s == "+")
			{
				auto a = data.top(); data.pop();
				auto b = data.top(); data.pop();
				data.push(b + a);
			} else if(s == "-")
			{
				auto a = data.top(); data.pop();
				auto b = data.top(); data.pop();
				data.push(b - a);
			} else if(s == "*")
			{
				auto a = data.top(); data.pop();
				auto b = data.top(); data.pop();
				data.push(b * a);
			} else if(s == "/")
			{
				auto a = data.top(); data.pop();
				auto b = data.top(); data.pop();
				data.push(b / a);
			} else
			{
				data.push(atoi(s.c_str()));
			}
		}
		cout << fixed << setprecision(20) << data.top() << endl;
	}
}