#include <iostream>
#include <sstream>
#include <string>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main()
{
	string str;
	double s[128];

	while(getline(cin,str))
	{
		int t = 0;
		stringstream ss;
		ss << str;
		while(ss >> str)
		{
			     if(str=="+") { s[t-2] = s[t-2]+s[t-1]; t--; }
			else if(str=="-") { s[t-2] = s[t-2]-s[t-1]; t--; }
			else if(str=="*") { s[t-2] = s[t-2]*s[t-1]; t--; }
			else if(str=="/") { s[t-2] = s[t-2]/s[t-1]; t--; }
			else { s[t] = atoi(str.c_str()); t++; }
		}

		printf("%.6lf\n",s[0]);
	}
}