
import std.stdio;
import std.string;
import std.conv;
import std.array;

void main() {
  auto ops =
    ["+": (double x, double y) => x + y,
     "-": (double x, double y) => x - y,
     "*": (double x, double y) => x * y,
     "/": (double x, double y) => x / y];
  while(true) {
    string line = readln.chomp;
    if (stdin.eof) break;
    string[] content = line.split(" ");
    double[] state = [];
    while(content.length > 0) {
      string value = content.front;
      content.popFront;
      if (value in ops) {
        double a = state[$ - 2];
        double b = state[$ - 1];
        state.popBack;
        state.popBack;
        state ~= ops[value](a, b);
      }
      else {
        state ~= value.to!(double);
      }
    }
    writefln("%8f", state[0]);
  }
}