#include<iostream>
#include<stack>
#include<stdio.h>
using namespace std;
string str;
int id,size;
int next(){
  if(id>=size)return 0;

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


int get_int(){
  int num=0;

  while(1){
    if('0'<=str[id]&&str[id]<='9'){
      num*=10;
      num+=str[id]-'0';
    }else{
      id++;
      break;
    }
    id++;
  }
  return num;
}


char get_char(){
  char ch;
  ch=str[id];
  id+=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)){
    id=0;
    size=str.size();
    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;
}