#include<iostream>
#include<stack>
#include<string>
#include<cstdio>
using namespace std;

int main(){

  string s;
  double x,y;

  while(getline(cin,s)){
    double k = 0;
    bool p = false;
    stack < double > a

      for(int i=0;i<s.size();i++){
 
	if(s[i] == '+' || s[i] == '-' || s[i] == '*' || s[i] == '/'){
	  x = a.top();
	  a.pop();

	  y = a.top();
	  a.pop();

	  if(s[i] == '+')	a.push(y+x);
	  else if(s[i] == '-') a.push(y-x);
	  else if(s[i] == '*') a.push(y*x);
	  else if(s[i] == '/') a.push(y/x);

	}

	if(s[i] <=  '9' && s[i] >= '0'){
	  k *= 10;
	  k += (s[i] - '0');
	  p = true;
	}
 
	if(p == true && (s[i] == ' ' || s[i] == '\0')){
	  a.push(k);
	  k = 0;
	  p = false;
	}

      }
    printf("%.6f\n",a.top());
    a.pop();
  }
}