#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
#include <sstream>
#include <stack>
#include <cstdlib>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb push_back
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

vector<string> split(string &str,char delim)
{
  vector<string> res;
  size_t current = 0,found;
  while((found = str.find_first_of(delim,current)) != string::npos)
    {
      res.push_back(string(str,current,found  - current));
      current = found + 1;
    }
  res.push_back(string(str,current,str.size() - current));
  return res;
}

int main(void){
  string s;
  while(getline(cin,s)){
    double ans;
    vector<double> res;
    vector<string> ss = split(s,' ');
    rep(i,ss.size()){
      if(ss[i] == "+"){
	double a = res.back(); res.pop_back();
	double b = res.back(); res.pop_back();
	res.pb(b+a);
      }else if(ss[i] == "-"){
	double a = res.back(); res.pop_back();
	double b = res.back(); res.pop_back();
	res.pb(b-a);
      }else if(ss[i] == "*"){
	double a = res.back(); res.pop_back();
	double b = res.back(); res.pop_back();
	res.pb(b*a);
      }else if(ss[i] == "/"){
	double a = res.back(); res.pop_back();
	double b = res.back(); res.pop_back();
	res.pb(b/a);
      }else{
	res.pb(atof(ss[i].c_str()));
      }
    }    
    printf("%.9f\n",res.back());
  }
}