#include<iostream>
#include<stack>
#include<vector>
#include<cstdio>

using namespace std;

string in;

int main(){

  while(getline(cin,in)){
    stack <double> st;
    for(int i = 0; i < in.size(); i++){
      if(in[i] >= '0' && in[i] <= '9') {
	vector <char> V;
	while(1){
	  if(in[i] < '0' || in[i] > '9') break;
	  V.push_back(in[i]);
	  i++;
	}
	int kake = 1,sum = 0;
	for(int j = V.size()-1; j >= 0; j--){
	  sum += (V[j]-'0')*kake;
	  kake *= 10;
	}
	st.push(sum);
	//st.push(in[i]-'0');
	//cout << "push " << sum << endl;
      }else if(in[i] == '+' || in[i] == '-' || in[i] == '/' || in[i] == '*'){
	int num[2];
	num[0] = st.top();
	st.pop();
	num[1] = st.top();
	st.pop();
	if(in[i] == '+') st.push(num[1]+num[0]);
	if(in[i] == '-') st.push(num[1]-num[0]);
	if(in[i] == '/') st.push(num[1]/num[0]);
	if(in[i] == '*') st.push(num[1]*num[0]);
      }
    }
    printf("%.6f\n",st.top());
    //cout << st.top() << endl;
  }
  return 0;
}