#include <bits/stdc++.h>
using namespace std;
double f()
{
char s[1000];
cin >> s;
if (s[0] == '+')
return f() + f();
else if (s[0] == '-')
return f() - f();
else if (s[0] == '*')
return f() * f();
else if (s[0] == '/')
return f() / f();
else
return atof(s);
}
int main()
{
printf("%f\n", f());
return 0;
}