Application of homotopy perturbation method to the Bratu-type equations