#include <iostream>
#include <sstream>
#include <string>
#include <stack>
#include <cstdlib>
using namespace std;

int main() {
  int t;
  double a, b;
  const char *op[4] = {"+", "-", "*", "/"};
  stack<double> s;
  string buf, buf2;

  cout.setf(ios::fixed);
  while (getline(cin, buf)) {
    istringstream istr(buf);
    while (istr >> buf2) {
      for (t=0; t<4; t++) {
        if (buf2 == op[t]) break;
      }
      if (t == 4) {
        s.push(atof(buf2.c_str()));
      } else {
        b = s.top(); s.pop();
        a = s.top(); s.pop();
        if (t == 0) s.push(a+b);
        else if (t == 1) s.push(a-b);
        else if (t == 2) s.push(a*b);
        else s.push(a/b);
      }
    }
    a = s.top(); s.pop();
    cout.precision(6);
    cout << a << endl;
  }

  return 0;
}