#include <iostream>
#include <cstdio>
#include <stack>
#include <string>
#include <cstdlib>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	char str[80+4];
	while(fgets(str, sizeof(str), stdin) != NULL) {
		int i = 0;
		stack<double> s;
		string t;
		while(str[i] != '\n') {
			if(str[i] == ' ') {
				if(isdigit(t[0])) {
					double n = atof(t.c_str());
					s.push(n);
				} else {
					if(t == "+") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = a + b;
						s.push(c);
					}
					if(t == "-") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = b - a;
						s.push(c);
					}
					if(t == "*") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = a * b;
						s.push(c);
					}
					if(t == "/") {
						double a = s.top(); s.pop();
						double b = s.top(); s.pop();
						double c = b / a;
						s.push(c);
					}
				}
				i++; t = ""; continue;
			}
			t += str[i];
			i++;
		}
		double a = s.top(); s.pop();
		double b = s.top(); s.pop();
		if(t == "+") cout << a + b << endl;
		else if(t == "-") cout << b - a << endl;
		else if(t == "*") cout << a * b << endl;
		else cout << b / a << endl;
	}
	return 0;
}