#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 resp;
    double value;
    double cal1, cal2;

    reset();

    while (1) {
        if (scanf("%d", &resp) != 1) {
            return 0;
        }

        if (resp==9) {
            break;
        }

        switch (resp) {
            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:
                if (stack[sp - 1] == 0.0) {
                	printf("0で割ることはできません\n");
                } 
                else {
                    cal2 = pop();
                    cal1 = pop();
                    push(cal1 / cal2);
                }
                break;

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

    answer();

    return 0;
}

void push(double value)
{
    if (isFull() == 1) {
        printf("スタックが満杯で入りませんでした\n");
    } else {
        stack[sp] = value;
        sp++;
    }
}

double pop(void)
{
    if (isEmpty() == 1) {
        printf("スタックが空で取り出せませんでした\n");
        return 0.0;
    } else {
        sp--;
        return stack[sp];
    }
}

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

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

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

void reset(void)
{
    sp = 0;
}