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


int main(){
	double sta[80];
	int sp;
	string s;
	while(getline(cin,s)){
		stringstream ss;
		ss<<s;
		sp=0;
		while(ss>>s){
			if(isdigit(s[0]))sta[sp++]=atoi(s.c_str());
			else if(s[0]=='-'&&s.size()!=1){
				sta[sp++]=-atoi(s.c_str()+1);
			}
			else {
				double a,b;
				b=sta[--sp];
				a=sta[--sp];
				if(s[0]=='+')sta[sp]=a+b;
				else if(s[0]=='-')sta[sp]=a-b;
				else if(s[0]=='*')sta[sp]=a*b;
				else if(s[0]=='/')sta[sp]=a/b;
				sp++;
			}
		}
		printf("%.5f\n",sta[0]);
	}
	return 0;
}