#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)
{
    double value, cal1, cal2;
    int resp;
    int dataCount = 0;

    reset();

    while (1) {
        scanf("%d", &resp);

        if (resp == 9) {
            break;
        }

        switch (resp) {
        case 1:
            cal1 = pop();
            cal2 = pop();
            push(cal1 + cal2);
            break;

        case 2:
            cal1 = pop();
            cal2 = pop();
            push(cal2 - cal1);
            break;

        case 3:
            cal1 = pop();
            cal2 = pop();
            push(cal1 * cal2);
            break;

        case 4:
            cal1 = pop();
            cal2 = pop();
            push(cal2 / cal1);
            break;

        case 5:
            scanf("%lf", &value);
            dataCount++;
            printf("data%d:%.6f\n", dataCount, value);
            push(value);
            break;
        }
    }

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

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

    return 0;
}

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

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

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