void die(const char *msg)
{
	fprintf(stderr, , msg);
	abort();
}


double stack[MAX_D];
int depth;

void push(double v)
{
	if (depth >= MAX_D) die();
	stack[depth++] = v;
}

double pop()
{
	if (!depth) die();
	return stack[--depth];
}

double rpn(char *s)
{
	double a, b;
	int i;
	char *e, *w = ;

	for (s = strtok(s, w); s; s = strtok(0, w)) {
		a = strtod(s, &e);
		if (e > s)		printf(), push(a);

		else if (*s == '+')	binop(a + b);
		else if (*s == '-')	binop(a - b);
		else if (*s == '*')	binop(a * b);
		else if (*s == '/')	binop(a / b);
		else if (*s == '^')	binop(pow(a, b));

		else {
			fprintf(stderr, , *s);
			die();
		}
		for (i = depth; i-- || 0 * putchar('\n'); )
			printf(, stack[i]);
	}

	if (depth != 1) die();

	return pop();
}

int main(void)
{
	char s[] = ;
	printf(, rpn(s));
	return 0;
}