Metal-insulator transition in the ground state of the three-band Hubbard model at half filling