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

double calc(string e){
  double num2 = st.top(); st.pop();
  double num1 = st.top(); st.pop();
  if(e == "+") return num1 + num2;
  else if(e == "-") return num1 - num2;
  else if(e == "*") return num1 * num2;
  else return num1 / num2;
}

int main(){
  string str;
  while(cin >> str){
    if(str == "+" || str == "-" || str == "*" || str == "/"){
      st.push(calc(str));
    } else {
      st.push(atoi(str.c_str()));
    }
    if(getchar() == '\n'){
      printf("%.10f\n",st.top());
      st.pop();
    }
  }
}