#include <iostream>
#include <stack>
#include <sstream>
#include <vector>
#include <cstdio>

using namespace std;

int main(int argc, char *argv[]) {
  string s;
  stack<double> num;
  vector<double> result;
  while (getline(cin, s)) {
    stringstream ss(s);
    while (ss >> s) {
      double a, b;
      if (s == "+") {
        a = num.top();
        num.pop();
        b = num.top();
        num.pop();
        num.push(a + b);
      } else if (s == "-") {
        a = num.top();
        num.pop();
        b = num.top();
        num.pop();
        num.push(b - a);
      } else if (s == "*") {
        a = num.top();
        num.pop();
        b = num.top();
        num.pop();
        num.push(a * b);
      } else if (s == "/") {
        a = num.top();
        num.pop();
        b = num.top();
        num.pop();
        num.push(b / a);
      } else {
        stringstream hoge(s);
        hoge >> a;
        num.push(a);
      }
    }
    result.push_back(num.top());
  }

  for (int i = 0; i < result.size(); i++)
    printf("%.6lf\n", result[i]);
  return 0;
}