#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 n;
        
        scanf("%d", &n);

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

void push(double value)
{
    if(!isFull()){
        stack[sp++] = value;
    }
}

double pop(void)
{
    if(!isEmpty()){
        return stack[--sp];
    }
    return 0;
}

int isFull(void)
{
    return sp >= SIZE;
}


int isEmpty(void)
{
    return sp == 0;
}

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

void reset(void)
{
    sp = 0;
}
