#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;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() {int i=0;while (1) {T[i]=getchar();if (T[i]=='\n' || T[i]==EOF) {if (!i) return 0;T[++i]='=';T[++i]=0;last=0;ans=0.000000;divid();printf("%.6lf\n",ans);i=0;if (T[i]==EOF) return 0;} else i++;}}