#include<stdio.h>

#define SIZE 10
double stack[SIZE];
int sp;

void push(double value);
double pop(void);
int isFull(void);
int isEmpty(void);
void answer(void);
void reset(void);

int main(void)
{
    int resp,data;
    double a,b,c;
    reset();

while(1){
     scanf("%d",&resp);
     
     switch(resp){
           case 1:
              b=pop();
              a=pop();
              push(a + b);
              break;
           case 2:
              b=pop();
              a=pop();
              push(a - b);
              break;
           case 3:
              b=pop();
              a=pop();
              push(a * b);
              break;
           case 4:
              b=pop();
              a=pop();
              push(a / b);
              break;
           case 5:
              scanf("%lf",&c);
              printf("data:%lf\n",c); 
              push(c);
              break;
           case 9:
              answer();
              return 0;
           default:
              break;
      }
   }
   return 0;
}

void push(double value){
    if(sp >= SIZE){
      printf("スタックが満杯です\n");
    }else{
        stack[sp++]=value;
    }
}

double pop(void){
      if(sp<=0){
        printf("スタックが空です\n");
      }else{
          return stack[--sp];
      }
}

int isFull(void){
   if(sp>=SIZE){
     return 1;
   }else{
     return 0;
   }
}

int isEmpty(void){
   if(sp<=0){
     return 1;
   }else{
     return 0;
   }
}

void answer(void){
    if(!isEmpty()){
      printf("answer:%f\n",stack[sp-1]);
    }
}

void reset(void){
    sp=0;
}