#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 select;
        double d, val1, val2;
        
        scanf("%d", &select);
        switch(select){
            case 1:
                val2 = pop();
                val1 = pop();
                push(val1 + val2);
                break;
            case 2:
                val2 = pop();
                val1 = pop();
                push(val1 - val2);
                break;
            case 3:
                val2 = pop();
                val1 = pop();
                push(val1 * val2);
                break;
            case 4:
                val2 = pop();
                val1 = pop();
                push(val1 / val2);
                break;
            case 5:
                scanf("%lf", &d);
                push(d);
                printf("data:%f\n", d);
                break;
            case 9:
                goto end_loop;
            default:
                break;
        }
    }
    end_loop:

    answer();
    return 0;
}

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

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

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

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

void answer(void)
{
    printf("answer:%f\n", stack[0]);
}

void reset(void)
{
    sp = 0;
}