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

bool digit(char c){
  return (c>='0') && (c<='9');
}

double stoi(string s){
  double k = 1.0,res = 0.0;
  for(int i = (int)s.size()-1;i>=0;i--){
    res += (s[i]-'0') * k;
    k *= 10;
  }
  return res;
}

double cal(double x, double y, char z){
  if(z == '-')return x-y;
  if(z == '*')return x*y;
  if(z == '/')return x/y;
  else return x+y;
}  

int main(){
  stack<double> a;
  queue<char> e;
  char str[100];

  while(fgets(str,100,stdin)!=NULL){
    int len = 0;
    while(str[len]!='\n')len++;

    int pos = 0;
    while(pos < len){
      if(digit(str[pos])){
	string tmp;
	while(str[pos] != ' ' && pos < len)tmp.push_back(str[pos++]);
	a.push(stoi(tmp));
      }else if(str[pos]!=' '){
	double x,y;
	y = a.top();
	a.pop();
	x = a.top();
	a.pop();
	a.push(cal(x,y,str[pos]));
      }
      pos++;
    }
    
    cout << a.top() << endl;
  }
}