#include <iostream>
#include <cstdio>
#include <cstring>
#include <stack>
#include <iomanip>
#include <sstream>
#include <cctype>
#include <cstdlib>
#include <string>
using namespace std;

double calc(double a, double b, string op){
  if(op == "+") return a + b;
  if(op == "-") return a - b;
  if(op == "*") return a * b;
  if(op == "/") return a / b;
}

int main(){
  string str;
  double a, b;
  while(getline(cin, str)){
    stack<double> st;
    stringstream ss;
    ss << str;
    while(ss >> str){
      if(str == "+" || str == "-" || str == "*" || str == "/"){
	a = st.top(); st.pop();
	b = st.top(); st.pop();
	st.push(calc(b, a, str));
	
      }
      else{
	st.push(atoi(str.c_str()));
      }
    }
    double ans = st.top(); st.pop();
    printf("%0.6f\n", ans);
  }
  return 0;
}