import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Stack;

public class rpn {
    // easy way to get a line at a time
    static final BufferedReader stdin = new BufferedReader(
        new InputStreamReader(System.in));
    // a Stack class, how convenient :)
    static final Stack stack = new Stack();

    public static void main(String args[]) throws IOException {
        while (true) {
            final String line = stdin.readLine(); // input line
            if (line.length() == 0) {
                System.exit(0);
            }
            // Java makes it so easy... Tokenise it with spaces as deliminators:
            final StringTokenizer stok = new StringTokenizer(line, " ", false);
            while (stok.hasMoreElements()) {
                final String token = stok.nextToken();
                final Double value;
                try {
                    value = Double.valueOf(token);
                    // if get this far its a number
                    stack.push(value);
                }
                catch (NumberFormatException e) {
                    // else its not, so assume its an operator
                    final double rhs = ((Double)stack.pop()).doubleValue();
                    final double lhs = ((Double)stack.pop()).doubleValue();
                    final char operator = token.charAt(0);
                    final Double result;
                    switch (operator) {
                        case '+': result = new Double(lhs + rhs); break;
                        case '-': result = new Double(lhs - rhs); break;
                        case '*': result = new Double(lhs * rhs); break;
                        case '/': result = new Double(lhs / rhs); break;
                        default: System.out.println("unkown op");
                                 result = null; // so result can be final
                                 System.exit(-1); break;
                    }
                    stack.push(result);
                }
            }
            System.out.println((Double)stack.pop()); // we're done, show answer
        }
    }
} 

