#include <algorithm>
#include <cctype>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stack>

using namespace std;

int main() {
  string tmp;
  while (getline(cin, tmp)) {
    stringstream ss(tmp);

    string str;
    stack<double> s;
    while (ss >> str) {
      if (any_of(str.cbegin(), str.cend(),
                 [](char ch) { return isdigit(ch); })) {
        s.push(stoi(str));
      } else {
        double b = s.top();
        s.pop();
        double a = s.top();
        s.pop();

        switch (str[0]) {
        case '+':
          s.push(a + b);
          break;
        case '-':
          s.push(a - b);
          break;
        case '*':
          s.push(a * b);
          break;
        case '/':
          s.push(a / b);
          break;
        }
      }
    }
    cout << fixed << setprecision(5) << s.top() << endl;
  }
}
