#include<bits/stdc++.h>
using namespace std;


pair<double,string> ds(string s){
  stringstream ss(s);
  double res1 = 0;
  string res2 = "";
  ss>>res1;
  ss.ignore();
  getline(ss,res2);
  return make_pair(res1,res2);
}

pair<char,string> cs(string s){
  stringstream ss(s);
  char res1 = 0;
  string res2 = "";
  ss>>res1;
  ss.ignore();
  getline(ss,res2);
  return make_pair(res1,res2);
}
double solve(string s){
  stack<double> st;
  double res = 0;
  while(s.size()!=0){
    if(s[0]<'0' || s[0]>'9'){
      auto tmp = cs(s);
      char c = tmp.first;
      s = tmp.second;
      double b = st.top();st.pop();
      double a = st.top();st.pop();
      switch(c){
        case '+':
          a += b;
          break;
        case '/':
          a /= b;
          break;
        case '*':
          a *= b;
          break;
        case '-':
          a -= b;
          break;
      }
      st.push(a);
    }else{
      auto tmp = ds(s);
      st.push(tmp.first);
      s = tmp.second;
    }
  }
  return st.top();
}

int main(){
  string s;
  while(!cin.eof()){
    getline(cin,s);
    cout<<solve(s)<<endl;
  }
}