#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;
/*
template <typename T>
class UF
{
public:
	void push ( T a )
	{
		M[a] = count;
		V.push_back ( count );
		rank.push_back ( 0 );
		count++;
	}

	void unite ( T a , T b )
	{
		long long int x = find ( M[a] );
		long long int y = find ( M[b] );
		if( x == y )return;
		if( rank[x] < rank[y] )
		{
			V[x] = y;
		} else
		{
			V[y] = x;
			if( rank[x] == rank[y] )rank[x]++;
		}
	}
	bool same ( T a , T b )
	{
		return find ( M[a] ) == find ( M[b] );
	}
	long long int group ()
	{
		set<long long int>S;
		for( long long int i = 0; i < V.size (); i++ )
		{
			S.insert ( find ( V[i] ) );
		}
		return S.size ();
	}

private:
	vector<long long int>V , rank;
	map < T , long long int>M;
	long long int count = 0;

	long long int find ( long long int x )
	{
		if( V[x] == x )return x;
		else return V[x] = find ( V[x] );
	}
};
*/

int main ()
{
	string str;
	while( getline ( cin , str ) )
	{
		vector<double>data;
		int r = 0;
		bool f = 0;
		for( size_t i = 0; i < str.size ();i++ )
		{
			switch( str[i] )
			{
				case '+':{
					int b = data.back (); data.pop_back ();
					int a = data.back (); data.pop_back ();
					data.push_back ( a + b );
					f = 0;
					break;
				}
				case '*':{
					int b = data.back (); data.pop_back ();
					int a = data.back (); data.pop_back ();
					data.push_back ( a * b );
					f = 0;
					break;
				}
				case '-':{
					int b = data.back (); data.pop_back ();
					int a = data.back (); data.pop_back ();
					data.push_back ( a - b );
					f = 0;
					break;
				}
				case '/':{
					int b = data.back (); data.pop_back ();
					int a = data.back (); data.pop_back ();
					data.push_back ( a / b );
					f = 0;
					break;
				}
				case ' ':{
					if( f )
					{
						data.push_back ( r );
						r = 0;
					}
					break;
				}
				default:{
					r *= 10;
					r += str[i] - '0';
					f = 1;
				}
			}
		}
		cout << fixed<<setprecision(10)<< data[0] << endl;
	}
}