#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(){
  string a;
  int count;
  double buffer[100000];
  int x;

  while(cin >> a){
    //cout << "a" << a << endl;
    if(a=="+"){
      //cout << "+";
      buffer[count-2]+=buffer[--count];
    }
    else if(a=="-"){
      //cout <<"-";
      buffer[count-2]-=buffer[--count];
    }
    else if(a=="*"){
      //cout <<"*";
      buffer[count-2]*=buffer[--count];
    }
    else if(a=="/"){
      //cout << "/";
      buffer[count-2]/=buffer[--count];
    }    
    else{
      istringstream ss(a);
      ss >> x;
      buffer[count++] = x;
    }
    //    cout << count << endl;
    //cout << buffer[count-1] << endl << endl;
  }
  for(int i=0;i<count-1;i++){
    cout << buffer[i] << endl;
  }
  cout << buffer[count-1];
}