Thou shalt not bow down thyself to them, nor serve them: for I the LORD thy God am a jealous God, visiting the iniquity of the fathers upon the children unto the third and fourth generation of them that hate me; And shewing mercy unto thousands of them that love me, and keep my commandments. Exodus 20:5-6
Another insight we have we see in a number of places, the 10 commandments being one, where it says, (20:5-6) "...a zealous God Who visits the sins of the father upon children to the third and fourth generations, for those who hate Me; but Who does kindness for thousands of generations for those who love Me and observe My commandments."
There is a principle that when something is mentioned in plural but without a number we assume it to mean the minimum plural, two. So “thousands of generations” = two thousand generations.
In summary, punishment is paid to the 4th generation and reward to the 2000th. That's a 1:500 ratio between payback for sin and payback for deeds. Joining this with the first insight of midah k'neged midah-Measure for measure- we have the payback for sinning is 1 to 1 while reward is paid back 500 times the good deed.