SS payout is a function of your highest earning in 35 years.
If you worked 30 years and have 5 years earned 0, those 0 are counted to calculate SS payout.