#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <stack>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <string>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  string line;
  while(getline(cin,line)) {
    char str[81];
    strcpy(str, line.c_str());
    char *p;
    p = strtok(str, " ");
    stack<double> sk;
    while(p) {
      if (strlen(p) == 1 && !isdigit(*p)) {
        double tmp2 = sk.top();
        sk.pop();
        double tmp1 = sk.top();
        sk.pop();
        if (*p=='+')
          sk.push(tmp1+tmp2);
        else if (*p=='-')
          sk.push(tmp1-tmp2);
        else if (*p=='*')
          sk.push(tmp1*tmp2);
        else if (*p=='/')
          sk.push(tmp1/tmp2);
      } else
        sk.push(atof(p));
      p = strtok(NULL, " ");
    }
    printf("%.6lf\n", sk.top());
  }
}