#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>

int main(void)
{
	char str[80];
	while(fgets(str,80,stdin)!=NULL)
	{
		double num[80];
		int num_i=0;
		char *tp=strtok(str," ");
		while(tp!=NULL){
			if(isdigit(tp[0]))	num[num_i++]=atof(tp);
			else{
				if(tp[0]=='+')	num[num_i-2]=num[num_i-2]+num[num_i-1];
				else if(tp[0]=='-')	num[num_i-2]=num[num_i-2]-num[num_i-1];
				else if(tp[0]=='*') num[num_i-2]=num[num_i-2]*num[num_i-1];
				else if(tp[0]=='/') num[num_i-2]=num[num_i-2]/num[num_i-1];
				num_i--;
			}
			tp=strtok(NULL," ");
		}
		printf("%.6f\n",num[0]);
	}
	return 0;
}