#include <bits/stdc++.h>
using namespace std;

int main(){
stack <double> s;
string ss,aa;
while(getline(cin,ss)){
//cout<<ss<<endl;
stringstream sss(ss);
while(sss>>aa){
 if(aa=="-"){

	 double a=s.top();s.pop();

	 double b=s.top();s.pop();
	 s.push(b-a);
 }else if(aa=="+"){
	 double a=s.top();s.pop();

	 double b=s.top();s.pop();
	 s.push(b+a);

 }else if(aa=="*"){
	 double a=s.top();s.pop();

	 double b=s.top();s.pop();
	 s.push(b*a);

 }else if(aa=="/"){
	 double a=s.top();s.pop();

	 double b=s.top();s.pop();
	 s.push(b/a);
 }else{
	// cout<<aa<<endl;
	 //cout<<aa[0]<<" "<<aa[1]<<endl;
	 if(aa[0] != '-'){
int suma=0;
	 	 for (int i = 0; i<aa.length() ; ++i) {
	 		 suma+=pow(10,aa.length()-1-i)*(aa[i]-'0');
	 	 }

	 	s.push(suma);
}else{
	int suma=0;
		 	 for (int i = 1; i<=aa.length()-1 ; ++i) {
		 		 suma+=pow(10,aa.length()-1-i)*(aa[i]-'0');
		 	 }
suma=-1*suma;
		 	s.push(suma);

}
 }

}

printf("%.10lf\n",s.top());

}
}