program random;


const
  IM = 139968;
  IA =   3877;
  IC =  29573;

var
  LAST: integer;

function gen_random(n: integer): double;
begin
  LAST := (LAST * IA + IC) mod IM;
  result := n * LAST / IM;
end;

var NUM, code, i: integer;
begin
  NUM :=1;
  if ParamCount=1 then
    Val(ParamStr(1),NUM,code);

  LAST := 42;
  for i:= 1 to NUM-1 do
    gen_random(100);
  WriteLn(gen_random(100):10:9);
end.