Effect of charging energy on superconductivity in granular metal films