Compensation of propagation loss of surface plasmon polaritons with a finite-thickness dielectric gain layer