#include <iostream>
#include <cstdio>
#include <cstring>
#include <stack>
#include <deque>
#include <sstream>
#include <cctype>
using namespace std;

double calc(double a, double b, char op){
  if(op == '+') return a + b;
  if(op == '-') return a - b;
  if(op == '*') return a * b;
  if(op == '/') return a / b;
}

int main(){
  string str;
  deque<double> num;
  double a, b;
  int tmp;
  while(getline(cin, str)){
    num.clear();
    for(int i = 0 ; i < str.size() ; i++){
      if(str[i] == ' ') continue;
      
      if(isdigit(str[i])){
	tmp = 1;
	tmp *= str[i]-'0';
	while(str[i+1] != ' '){
	  i++;
	  tmp *= 10;
	  tmp += str[i]-'0';
	}
	num.push_front(tmp);
      }
      
      else{
	a = num.front(); num.pop_front();
	b = num.front(); num.pop_front();
	//printf("%f %f\n", b, a);
	double res = calc(b, a, str[i]);
	num.push_front(res);
      }
    }
    double ans = num.front();
    printf("%f\n", ans);
    num.pop_front();
  }
  return 0;
}