#include <iostream>
#include <cstdio>
#include <stack>
#include <string>
#include <cstring>
#include <sstream>
#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() {
	string str;
	while(getline(cin, str)) {
		stack<double> s;
		stringstream ss;
		ss << str;
		while(ss >> str) {
			if(isdigit(str[0]) || str.length() > 1) {
				s.push(atoi(str.c_str()));
			} else {
				double a = s.top(); s.pop();
				double b = s.top(); s.pop();
				double c;
				if(str[0] == '+') c = a + b;
				else if(str[0] == '-') c = b - a;
				else if(str[0] == '*') c = a * b;
				else c = b / a;						
				s.push(c);
			}
		}
		printf("%.6lf\n", s.top());
	}
	return 0;
}