#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <iomanip>
using namespace std;

double S[1000];
int f=0;

void push(double num){
  S[f]=num;
  f++;
}

double pop(){
  f--;
  double a=S[f];
  return a;
}

int main(){
  double num1,num2;
  char a[100],str[100];
  while(gets(a)!=NULL){
    f=0;
    for(int i=0,j=0;a[i]!='\0';i++){
      //cout << j<<endl;
      if((a[i]=='+'||a[i]=='-'||a[i]=='*'||a[i]=='/')&&(a[i+1]==' '||a[i+1]=='\0')){
        num1=pop();
        num2=pop();
        switch(a[i]){
        case '+':
          push(num2+num1);
          break;
        case '-':
          push(num2-num1);
          break;
        case '*':
          push(num2*num1);
          break;
        case '/':
          push(num2/num1);
          break;
        }
        //num1=pop();
        //cout<<num1<<endl;
        //push(num1);
        i++;
        continue;
      }
      if(a[i]==' '||a[i]=='\0'){
        str[j]='\0';
        j=0;
        //printf("%s\n",str);
        push(atof(str));
        if(a[i]=='\0'){
          break;
        }
        continue;
      }
      str[j]=a[i];j++;
    }
    cout<< fixed << setprecision(6) << pop()<<endl;
  }
  return 0;
}