#include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
//#define scanf scanf_s

int main()
{
	string s;
	while (getline(cin, s))
	{
		stack<double> v;
		stringstream ss;
		string a;
		ss << s;
		while (ss >> a)
		{
			if (a == "+")
			{
				long double x = v.top();
				v.pop();
				long double y = v.top();
				v.pop();
				v.push(y + x);
			}
			else if (a == "-")
			{
				long double x = v.top();
				v.pop();
				long double y = v.top();
				v.pop();
				v.push(y - x);
			}
			else if (a == "*")
			{
				long double x = v.top();
				v.pop();
				long double y = v.top();
				v.pop();
				v.push(y * x);
			}
			else if (a == "/")
			{
				long double x = v.top();
				v.pop();
				long double y = v.top();
				v.pop();
				v.push(y / x);
			}
			else
			{
				v.push(stod(a));
			}
		}
		printf("%6f\n", v.top());
	}
	return 0;
}