#include <cctype>
#include <iostream>
#include <random>
#include <stack>
#include <algorithm>
#include <unordered_map>
using namespace std;
stack<char> op;
stack<float> num;
unordered_map<char, int> prime{{'+',1},{'-',1},{'*',2},{'/',2}};
string str;
void eval(){
auto b = num.top(); num.pop();
auto a = num.top(); num.pop();
auto c = op.top(); op.pop();
float x;
if(c == '+') x = a + b;
else if(c == '-') x = a - b;
else if(c == '*') x = a * b;
else if(c == '/') x = a / b;
num.push(x);
}
int main() {
while (cin >> str) {
for(int i = 0; i < str.size(); i ++){
if(isdigit(str[i])){
float x = 0;
for(; i < str.size() && isdigit(str[i]); i ++){
x = x * 10 + str[i] - '0';
}
num.push(x);
i --;
}
else{
while(!op.empty() && prime[op.top()] >= prime[str[i]])
eval();
op.push(str[i]);
}
}
while (!op.empty()) {
eval();
}
cout << num.top() << endl;
num.pop();
}
return 0;
}
// 64 位输出请用 printf("%lld")