#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<algorithm>

using namespace std;

int string_to_int(const string& str){
  int n;
  istringstream iss(str);
  iss >> n;
  return n;
}

int main(){
  string str;
  while(getline(cin, str)){
    vector<double> data;
    string::iterator i, j;
    i = str.begin();
    while(1){
      j = find(i, str.end(), ' ');
      const string str_(i, j);
      if(str_[0] >= '0' && str_[0] <= '9'){
	data.push_back((double)string_to_int(str_));
      }else{
	double x = data[data.size()-1];
	data.pop_back();
	if(str_ == "+") data[data.size()-1] += x;
	if(str_ == "-") data[data.size()-1] -= x;
	if(str_ == "*") data[data.size()-1] *= x;
	if(str_ == "/") data[data.size()-1] /= x;
      }
      if(j == str.end()) break;
      i = j+1;
    }
    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(6);
    cout << data[0] << endl;
  }
  return 0;
}