#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stack>

using namespace std;
int main(){
  int i;
  char in[82],*ind;
  stack<double> st;
  double p1,p2;
  while(fgets(in,82,stdin)!=NULL){
    for(ind=strtok(in," ");ind!=NULL;ind=strtok(NULL," ")){
      if(ind[0]=='+'){
	p1=st.top();
	st.pop();
	p2=st.top();
	st.pop();
	st.push(p2+p1);
	goto jump;
      }else if(ind[0]=='-'){
	p1=st.top();
	st.pop();
	p2=st.top();
	st.pop();
	st.push(p2-p1);
	goto jump;
      }else if(ind[0]=='*'){
	p1=st.top();
	st.pop();
	p2=st.top();
	st.pop();
	st.push(p2*p1);
	goto jump;
      }else if(ind[0]=='/'){
	p1=st.top();
	st.pop();
	p2=st.top();
	st.pop();
	st.push(p2/p1);
	goto jump;
      }
      st.push(atof(ind));
    jump:;
    }
    printf("%lf\n",st.top());
    st.pop();
  }
  return 0;
}