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

int main(){

  string s;

  while(getline(cin,s)){
    double k = 0;
    int p = 1,j = 0;
    double a[100];

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

	if(s[i] == '+')	a[j-2] = a[j-2] + a[j-1];
	else if(s[i] == '-') a[j-2] = a[j-2] - a[j-1];
	else if(s[i] == '*') a[j-2] = a[j-2] * a[j-1];
	else if(s[i] == '/') a[j-2] = a[j-2] / a[j-1];

	j--;
      }

      if(s[i] <=  '9' && s[i] >= '0'){
	k *= 10;
	k += (s[i] - '0');
	p = 0;
      }
 
      if(!p && s[i] == ' '){
	a[j] = k;
	j++;
	k = 0;
	p = 1;
      }

    }
  
    printf("%.6f\n",a[j-1]);
  }
}