#include <stdio.h>
#include <string.h>
double RB[1005];double ans;int last;char T[99];
void divid() {int i,j=strlen(T);double k=0;T[j]='=';last=0;for (i=0;i<=j;i++) {if (T[i]>='0' && T[i]<='9') k=k*10+(T[i]-'0'); else {if (k) {RB[last++]=k,k=0;continue;} if (T[i]=='-') last--,RB[last-1]-=RB[last]; else if (T[i]=='+') last--,RB[last-1]+=RB[last]; else if (T[i]=='*') last--,RB[last-1]*=RB[last]; else if (T[i]=='/') last--,RB[last-1]/=RB[last];}} ans=RB[0];}
int main() {while (gets(T)!=NULL) {last=0;ans=0.000000;divid();printf("%.6lf\n",ans);} return 0;}