#include<stdio.h>
#include<stack>
#include<ctype.h>
int main()
{
	char str[83],*p;
	while(fgets(str,83,stdin))
	{
		std::stack<double> s;
		for(p=str;*p&&*p!='\n';)
		{
			double u,v=0;
			if(isdigit(*p))
			{
				while(isdigit(*p))
					v=v*10+*p-'0',++p;
				s.push(v),++p;
			}
			else
			{
				u=s.top(),s.pop(),v=s.top(),s.pop();
				if(*p=='+') s.push(v+u);
				else if(*p=='-') s.push(v-u);
				else if(*p=='*') s.push(v*u);
				else s.push(v/u);
				p+=2;
			}
		}
		printf("%f\n",s.top());
	}
	return 0;
}