#include <iostream>
#include <string>
#include <stack>
#include <iomanip>
using namespace std;
 
int main() {
 
  string in;
 
  while( true ) {
    if ( cin.eof() ) break;
 
    getline( cin, in );
    if ( in.size() == 0 ) break;
 
    stack<double> s;
 
    long long int k = 0;
    long long int d = 0;
 
    for ( int i = 0; i < in.size(); i++ ) {
      if ( in[i] >= '0' && in[i] <= '9' ) {
    k *= 10;
    k += in[i] - '0';
    d *= 10;
	if(i == in.size() - 1){
if ( d == 0 ) {
      s.push( 1.00 * k );
    }else {
      s.push( 1.00 * k / d );
    }
    k = 0;
    d = 0;
        }
      }else if ( in[i] == ' ' ) {
    if ( d == 0 ) {
      s.push( 1.00 * k );
    }else {
      s.push( 1.00 * k / d );
    }
    k = 0;
    d = 0;
      }else if ( in[i] == '.' ) {
    d = 1;
      }else {
    double a, b;
    a = s.top();
    s.pop();
    b = s.top();
    s.pop();
    if ( in[i] == '+' ) {
      //      cout << a << " + " << b << endl;
      b += a;
    }else if ( in[i] == '-' ) {
      //cout << a << " - " << b << endl;
      b -= a;
    }else if ( in[i] == '*' ) {
      //cout << a << " * " << b << endl;
      b *= a;
    }else if ( in[i] == '/' ) {
      //cout << a << " / " << b << endl;
      b /= a;
    }
    s.push( b );
    i++;
      }
    }
 
    cout << fixed << setprecision( 10 ) << s.top() << endl;
 
  }
 
  return 0;
 
}