Monte Carlo study of the site-percolation model in two and three dimensions