#include<bits/stdc++.h>
#include<sstream>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

const string expr[] = {"+", "-", "*", "/"};
string str;

int main()
{
  while(getline(cin, str)){
    stack<double> st;
    string tmp;
    istringstream stream(str);
    while(getline(stream, tmp, ' ')){
      bool flag = false;
      rep(k, 4) if(tmp == expr[k]){
        double a = st.top();  st.pop();
        double b = st.top();  st.pop();
        if(k == 0){ st.push(b + a);  flag = true;  break; }
        if(k == 1){ st.push(b - a);  flag = true;  break; }
        if(k == 2){ st.push(b * a);  flag = true;  break; }
        if(k == 3){ st.push(b / a);  flag = true;  break; }
      }
      if(!flag) st.push((double)strtol(tmp.c_str(), NULL, 10));
    }
    printf("%.15f\n", st.top());
  }

  return 0;
}