#include <iostream>
#include <stack>
#include <cstdio>
#include <string.h>
#include <algorithm>
#include <sstream>
using namespace std;

const string op = "+-*/";

int main(){
  string s;

  while(getline(cin,s)){
    stringstream ss;
    ss << s;
    stack<double> st;
    while(ss >> s){
      int t = op.find(s);
      if(t >= 0){
	double b = st.top();st.pop();
	double a = st.top();st.pop();
	switch(t){
	case 0: st.push(a+b);break;
	case 1: st.push(a-b);break;
	case 2: st.push(a*b);break;
	case 3: st.push(a/b);break;
	}
      } else {
	st.push(atoi(s.c_str()));
      }
    }
    printf("%.8f\n",st.top());
  }
  return 0;
}