#include <iostream>
#include <cstdio>
#include <cstring>
#include <stack>
#include <deque>
#include <sstream>
#include <cctype>
#include <cstdlib>
using namespace std;
 
int main(){
  string str;
  while(getline(cin, str)){
    string tmp;
    stack<double> st;
    istringstream iss(str);
    while(iss >> tmp){
      cout <<tmp<<endl;
      if(tmp == "+" || tmp == "-" || tmp == "*" || tmp == "/"){
	double a = st.top();
	st.pop();
	double b = st.top();
	st.pop();
	if(tmp == "+") st.push(b+a);
	else if(tmp == "-") st.push(b-a);
	else if(tmp == "*") st.push(b*a);
	else if(tmp == "/") st.push(b/a);
	else st.push(atof(tmp.c_str()));
      }
    }
    printf("%.6f\n", st.top());
  }
  return 0;
}