Calculation of the dielectric constant for a dilute magnetic alloy