#include <bits/stdc++.h>
using namespace std;

int main()
{
	int n;
	double a, b;
	char ch;
	stack<double> st;
	while ((ch = getchar()) != EOF) {
		if (ch >= '0' && ch <= '9') {
			ungetc(ch, stdin);
			scanf("%d", &n);
			st.push((double)n);
		}
		else if (ch == '\n') {
			printf("%.6f\n", st.top()); st.pop();
		}
		else if (ch != ' ') {
			b = st.top(); st.pop();
			a = st.top(); st.pop();
			if (ch == '+')
				st.push(a + b);
			if (ch == '-')
				st.push(a - b);
			if (ch == '*')
				st.push(a * b);
			if (ch == '/')
				st.push(a / b);
		}
	}
	if (st.size() == 1) {
		printf("%.6f\n", st.top()); st.pop();
	}
	return 0;
}