#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>

using namespace std;

int main() {
  int count=0;
  vector<double> s;
  string str;
  while (cin >> str) {
    vector<string> ops = {"+","-","*","/"};
    auto itr = find(begin(ops), end(ops), str);
    if (itr != end(ops)) {
      double b = s.back(); s.pop_back();
      double a = s.back(); s.pop_back();
      if (*itr == "+") s.push_back(a + b);
      if (*itr == "-") s.push_back(a - b);
      if (*itr == "*") s.push_back(a * b);
      if (*itr == "/") s.push_back(a / b);
    } else {
      s.push_back(stof(str));
    }
  }
  cout << setiosflags(ios::fixed) << setprecision(6);
  for (double d : s) {
    cout << d << endl;
  }
  return 0;
}