#include<iostream>
#include<stack>
#include<sstream>
#include<iomanip>
#include<deque>
#include<string>
using namespace std;
double stod(string s){
  double ret;
  stringstream ss;
  ss << s;
  ss >> ret;
  return ret;
}

string dtos(double d){
  stringstream ss;
  ss << d;
  return ss.str();
}

int main(){
 
  string s;
  
  while(getline(cin,s)){
    //cout << s  << endl;
    deque<string> st1;
    stack<string> st2;
 
    stringstream ss;
    ss << s;

    int cnt = 0;
    while(cnt < (ss.str()).size()){
      string input;
      ss >> input;
      if(input == "")
	break;      
     
      st1.push_front(input),cnt++;
    }

    

    while(st1.size()){
      string pp = st1.back(); st1.pop_back();
      //cout << "pp = " << pp << endl;
      if(pp == "+"){
	string a,b;
	a = st2.top(); st2.pop();
	b = st2.top(); st2.pop();
	double da,db;
	da = stod(a);
	db = stod(b);
	//cout << db << "+" << da << endl;
	st2.push(dtos(db+da));
	//cout << "push! " << st2.top() << endl;
      }
      else if(pp == "-"){
	string a,b;
	a = st2.top(); st2.pop();
	b = st2.top(); st2.pop();
	double da,db;
	da = stod(a);
	db = stod(b);
	//cout << db << "-" << da << endl;
	st2.push(dtos(db-da));
	//cout << "push! " << st2.top() << endl;
      }
      else if(pp == "*"){
	string a,b;
	a = st2.top(); st2.pop();
	b = st2.top(); st2.pop();
	double da,db;
	da = stod(a);
	db = stod(b);
	//cout << db << "*" << da << endl;
	st2.push(dtos(db*da));
	//cout << "push! " << st2.top() << endl;
      }
      else if(pp == "/"){
	string a,b;
	a = st2.top(); st2.pop();
	b = st2.top(); st2.pop();
	double da,db;
	da = stod(a);
	db = stod(b);
	//cout << db << "/" << da << endl;
	st2.push(dtos(db/da));
	//cout << "push! " << st2.top() << endl;
      }
      else{
	st2.push(pp);
      }
    }
    cout << setiosflags(ios::fixed) << setprecision(6) << stod(st2.top()) << endl;
  }
  return 0;
}