#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
	double s[80];
	int p = 0;
	char b[80];
	while (1)
	{
		p = 0;
		while (cin >> b)
		{
			if (cin.eof()) return 0;
			if (b[0] == '+')
				s[p-2] += s[p-1], p--;
			else if (b[0] == '-')
				s[p-2] -= s[p-1], p--;
			else if (b[0] == '*')
				s[p-2] *= s[p-1], p--;
			else if (b[0] == '/')
				s[p-2] /= s[p-1], p--;
			else
				s[p] = atoi(b), p++;
			if (cin.get() == '\n') break;
		}
		printf("%.6lf\n", s[p-1]);
	}
	return 0;
}