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

int main() {
  string s;
  while(getline(cin, s)) {
    stringstream ss(s);
    stack<double> stk;
    while(ss >> s) {
      if(isdigit(*s.rbegin())) {
        stk.push(atof(s.c_str()));
      } else {
        double b = stk.top(); stk.pop();
        double a = stk.top(); stk.pop();
        double res = 0;
        switch(s[0]) {
        case '+': res = a+b; break;
        case '-': res = a-b; break;
        case '*': res = a*b; break;
        case '/': res = a/b; break;
        }
        stk.push(res);
      }
    }
    printf("%.10f\n", stk.top());
  }
  return 0;
}