#include<iostream>
#include<string>
#include<sstream>
#include<stack>
#include<cstdlib>
#include<cstdio>
using namespace std;
int main(){
  string s,t;
  while(getline(cin,s)){
    stringstream x(s);
    stack<double> num;
    while(x>>t){
      if(t == "+" || t == "-" || t == "*" || t == "/"){
	double a,b;
	a = num.top();num.pop();
	b = num.top();num.pop();
	if(t == "+") num.push(b+a);
	if(t == "-") num.push(b-a);
	if(t == "*") num.push(b*a);
	if(t == "/") num.push(b/a);
      }
      else num.push(atof(t.c_str()));
    }
    printf("%.6lf\n",num.top());
  }
  return 0;
}