#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)
{
    int menu;
    double value;
    double cal1, cal2;

    reset();

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

        switch (menu) {

        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", &value);
            printf("data:%f\n", value);
            push(value);
            break;

        case 9:
            break;
        }

        if (menu == 9) {
            break;
        }
    }

    answer();

    return 0;
}

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

double pop(void)
{
    double value;

    if (isEmpty() == 0) {
        sp--;
        value = stack[sp];
        return value;
    }

    return 0;
}

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[sp - 1]);
}

void reset(void)
{
    sp = 0;
}