#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 mode;
        double a, b;
        scanf("%d", &mode);
        switch (mode) {
            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", &a);
                push(a);
                printf("data:%f\n", a);
                break;
            case 9:
                answer();
                return 0;
            default:
                break;
        }
    }
    return 0;
}

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

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

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;
}