Protecting the population with immune individuals