#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stack>
#include <string>
#include <stdlib.h>

using namespace std;

void solve()
{
	string str;
	while(getline(cin, str))
	{
		stack<double> digits;
		stringstream ss(str);
		string temp;
		while(ss >> temp)
		{
			if(temp == "+" || temp == "-" || temp == "*" || temp == "/")
			{
				double n1, n2;
				n2 = digits.top();
				digits.pop();
				n1 = digits.top();
				digits.pop();
				if(temp == "+")
				{
					digits.push(n1 + n2);
				}
				else if(temp == "-")
				{
					digits.push(n1 - n2);
				}
				else if(temp == "*")
				{
					digits.push(n1 * n2);
				}
				else if(temp == "/")
				{
					digits.push(n1 / n2);
				}
			}
			else
			{
				digits.push(atof(temp.c_str()));
			}
		}
		printf("%.6f\n", digits.top());
	}
}

int main()
{
	solve();
	return(0);
}