#include<iostream>
#include<string>
#include<stack>
#include<cstdio>
using namespace std;
int main(){
  string s;
  while(getline(cin,s)){
    stack<double> num;
    for(int i=0,t=0; i<s.size(); i++){
      if(s[i]>='0' && s[i]<='9') t = t*10+s[i]-'0';
      else if(s[i] == ' '){num.push(t);t = 0;}
      else{
	double a,b;
	a = num.top();num.pop();
	b = num.top();num.pop();
	if(s[i] == '-') num.push(b-a);
	if(s[i] == '+') num.push(b+a);
	if(s[i] == '*') num.push(b*a);
	if(s[i] == '/') num.push(b/a);
	i++;
      }
    }
    printf("%.6lf\n",num.top());
  }
  return 0;
}