var i    : integer;
    f    : text;
    f2   : file of integer;
    name : string;
begin
  if ParamCount = 1 then begin
  name := paramstr(1);
  Delete(name,length(name)-2,3);
  Assign(F,name+'txt');
  Reset(f);
  Assign(F2,name+'dat');
  ReWrite(f2);
  repeat
    Read(F,i);
    Write(F2,i);
  until EOF(F);
  close(F);
  Close(F2);
  end;
end.