#include <iostream>
#include <stack>
#include <string>
#include <cctype>
#include <iomanip>
#include <sstream>
#include <cstdlib>
using namespace std;

int main(){
  string t,st;
  double x,y;
  stack<double> s;
  while(getline(cin,t)){
    stringstream ss(t);
    while(ss>>st){
      if(st=="+"||st=="-"||st=="*"||st=="/"){
	y=s.top();
	s.pop();
	x=s.top();
	s.pop();
	switch(st[0]){
	case '+':
	  x+=y;break;
	case '-':
	  x-=y;break;
	case '*':
	  x*=y;break;
	case '/':
	  x/=y;break;
	}
	s.push(x);
      }
      else s.push(atof(st.c_str()));
    }
    cout<<fixed<<setprecision(6)<<s.top()<<endl;
    s.pop();
  }
    return 0;
}