#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <stack>
using namespace std;

int main() {
    string input;
    while (getline(cin, input)) {
        stack<double> stack;
        while (input.length() > 0) {
            string ch = input.substr(0, input.find_first_of(' '));
            if (isdigit(ch[0])) {
                stack.push(atoi(ch.data()));
            } else {
                double x2 = stack.top(); stack.pop();
                double x1 = stack.top(); stack.pop();
                switch (ch[0]) {
                case '+':
                    stack.push(x1 + x2);
                    break;
                case '-':
                    stack.push(x1 - x2);
                    break;
                case '*':
                    stack.push(x1 * x2);
                    break;
                case '/':
                    stack.push(x1 / x2);
                    break;
                }
            }
            if (input.find_first_of(' ') != string::npos) {
                input.erase(0, input.find_first_of(' ') + 1);
            } else {
                input.clear();
            }
        }
        printf("%.6f\n", stack.top());
        stack.pop();
    }
}