#include<bits/stdc++.h>
using namespace std;
int main()
{
    string str;
    while(getline(cin,str)){
        stack<double> st;
        for(int i=0,point=0;;i++){
            if(str[i]==' '||str[i]=='\0'){
                int num[2]={};
                if(i-point==1){
                    if(str[point]-'0'>9||str[point]-'0'<0){
                        double righ,lef;
                        righ=st.top();
                        st.pop();
                        lef=st.top();
                        st.pop();
                        if(str[point]=='+')st.push(lef+righ);
                        else if(str[point]=='-')st.push(lef-righ);
                        else if(str[point]=='*')st.push(lef*righ);
                        else st.push(lef/righ);
                        }
                    else st.push(str[point]-'0');
                }
                else st.push((str[point]-'0')*10+str[i-1]-'0');
                if(str[i]=='\0')break;
                point=i+1;
            }
        }
        cout<<st.top()<<endl;
        st.pop();
    }
}