Reorganization of files and calculation of bell number