#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){
	reset();

while(1){
	int sp;
        double val, cal1, cal2;
        
        scanf("%d", &sp);
        
        if (sp == 9) {
            break;
        }
        
        switch (sp) {
            case 1:
                cal2 = pop();
                cal1 = pop();
                push(cal1 + cal2);
                break;
            case 2:
                cal2 = pop();
                cal1 = pop();
                push(cal1 - cal2);
                break;
            case 3:
                cal2 = pop();
                cal1 = pop();
                push(cal1 * cal2);
                break;
            case 4:
                cal2 = pop();
                cal1 = pop();
                push(cal1 / cal2);
                break;
            case 5:
                scanf("%lf", &val);
                push(val);
                printf("data:%f\n", val);
                break;
        }
}
        answer();
        return 0;
}

void push(double value){
	if (isFull() == 0) {
        
        stack[sp++] = value;
    } else {
        printf("Stack is full.\n");
    }
}
double pop(void){
	if (isEmpty() == 0) {
        return stack[--sp];
    } else {
        printf("Stack is empty.\n");
        return 0;
    }
}
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){
	printf("answer:%f\n", stack[sp - 1]);
}
void reset(void){
	while(!isEmpty()){
	 pop();
	}
}