#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999;
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define EPS 1e-10
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

double distanceAB(double xa, double ya, double xb, double yb);
void trace(int A[], int N);

/*
class Target
{
public:
	vector <string> draw(int n)
	{

	}
};
*/



int main()
{
	string inp, w;
	stack<double> si;
	double a, b;
	
	while (getline(cin, inp))
	{
		stringstream ss(inp);
		while (ss >> w)
		{
			if (w == "+")
			{
				a = si.top(); si.pop();
				b = si.top(); si.pop();
				si.push(a + b);
			} else if (w == "-") {
				a = si.top(); si.pop();
				b = si.top(); si.pop();
				si.push(b - a);
			} else if (w == "*") {
				a = si.top(); si.pop();
				b = si.top(); si.pop();
				si.push(a * b);
			} else if (w == "/") {
				a = si.top(); si.pop();
				b = si.top(); si.pop();
				si.push(b / a);
			} else {
				si.push(atoi(w.c_str()));
			}
		}
		cout << fixed << setprecision(6);
		cout << si.top() << endl;
	}
	
	return 0;
}


void trace(int A[], int N)
{
	REP(N)
	{
		if (i > 0) cout << " ";
		cout << A[i];
	}
	cout << endl;
}


double distanceAB(double xa, double ya, double xb, double yb)
{
	return sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya));
}