#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	string op="+-/*";
	string s;
	while(getline(cin,s))
	{
		stringstream ss;
		ss << s;
		stack<double> st;
		while(ss>>s)
		{
			int f=op.find(s);
			if(f>=0)
			{
				double b=st.top();st.pop();
				double a=st.top();st.pop();
				switch(f)
				{
					case 0:st.push(a+b);break;
					case 1:st.push(a-b);break;
					case 2:st.push(a/b);break;
					case 3:st.push(a*b);break;
				}
			}
			else
			{
				st.push(atoi(s.c_str()));
			}
		}
		cout << st.top() << endl;
	}
	return 0;
}