Three solutions for a perturbed Dirichlet problem