The vaccine provides the best immune response at this age. Also, once you get the virus, the vaccine is less effective. So it's important for males and females to get the vaccine before they become sexually active. Two shots are needed before age 15. After age 15, three shots are necessary for the vaccine to be effective.