Solutions of the perturbed Klein-Gordon equations