#include<iostream>
#include<stack>
#include<stdio.h>
using namespace std;
string str;

int next(){
  if(str.size()==0)return 0;

  if('0'<=str[0]&&str[0]<='9'){
    return 1;
  }else{
    return 2;
  }
}


int get_int(){
  int num=0;

  for(int i=0;i<(int)str.size();i++){
    if('0'<=str[i]&&str[i]<='9'){
      num*=10;
      num+=str[i]-'0';
    }else{
      if(i<(int)str.size()-1){
	str=str.substr(i+1);
      }else{
	str="";
      }
      break;
    }
  }
  return num;
}


char get_char(){
  char ch;
  ch=str[0];
  if(str.size()<=2)str="";
  else str=str.substr(2);
  return ch;
}


double calc(double x,char ch,double y){
  if(ch=='+')return x+y;
  else if(ch=='-')return x-y;
  else if(ch=='*')return x*y;
  else return x/y;
}


int main(){
  double ans,a,b;
  stack<double>st;
  while(getline(cin,str)){


    while(next()>0){
      //cout<<str<<endl;
      if(next()==1){
	st.push(get_int());
      }else{
	b=st.top();st.pop();
	a=st.top();st.pop();
	st.push(calc(a,get_char(),b));
      }
    }
    ans=st.top();st.pop();
    while(!st.empty())st.pop();
    printf("%.6f\n",ans);
  }
  return 0;
}