Effect of metal ions on the dielectric properties of layer structure perovskites