Add perturbation penalty function to count penalty for specified lecture for last stage