{$i-}

program CALC (input, output);

uses
  CAL;

  var
    t, t2   : text;
    Tekst   : string;
    R       : real;

function AllSpaces (Tekst : string) : boolean;
  var
    Zo     : boolean;
    c      : integer;
  begin
    Zo:= Tekst = '';
    Zo:= Zo or true;
    for c:= 1 to length (Tekst) do
      if Tekst[c] <> ' ' then
        Zo:= false;
    AllSpaces:= Zo
  end;

begin
  assign (t, 'c:\RAMEN\TEMP\EXPR.DAT');
  reset (t);
  assign (t2, 'c:\RAMEN\TEMP\RESULT.DAT');
  rewrite (t2);
  readln (t, Tekst);
  while (AllSpaces(Tekst)) do
    readln (t, Tekst);
  close (t);
  R:= Evaluate (Tekst);
  writeln (t2, R);
  close (t2);
  halt (0)
end.
