Perturbed damped pendulum: finding periodic solutions via averaging method