Haley has an annual salary of $1,000,000 in 2020, 2021, and 2022. She is thinking about retiring at the beginning of 2023 after working for XYZ Corporation and participating in XYZ Corporation's defined benefit plan. If XYZ Corporation's defined benefit plan pays employees 3 percent for every year of service for the average of their three highest years of compensation, what is the minimum number of years of service that would maximize Haley's benefit if she were to retire at the beginning of 2023?