#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 input;
	    double value;
	    double a,b;
	    
		scanf("%d",&input);
		
		switch(input){
			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",&value);
			printf("data:%lf\n",value);
			push(value);
			break;
			
			case 9:
			goto END;
		}
	}
END:
    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)
{
	printf("answer:%lf\n",stack[sp - 1]);
}

void reset(void)
{
	sp = 0;
}