//21
#include<iostream>
#include<stack>
#include<string>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<iomanip>

using namespace std;

int main(){
  for(string s;getline(cin,s);){
    stringstream ss(s);
    stack<double> stk;
    for(string t;ss>>t;){
      if(t.size()>1||isdigit(t.c_str()[0])){
	stk.push(atof(t.c_str()));
      }else{
	double a,b;
	a=stk.top();
	stk.pop();
	b=stk.top();
	stk.pop();
	switch(t.c_str()[0]){
	case '+':
	  stk.push(b+a);
	  break;
	case '-':
	  stk.push(b-a);
	  break;
	case '*':
	  stk.push(b*a);
	  break;
	case '/':
	  stk.push(b/a);
	  break;
	}
      }
    }
    if(!stk.empty()){
      cout<<fixed<<setprecision(5)<<stk.top()<<endl;
    }
  }
  return 0;
}