If a player scores 39 points off a 10 handicap, (>38) his handicap must be reduced by 1 (to 9) If he scores 40 points, his handicap must reduce by 2 (to 8)

Can you please assist?

I can get the IF function to work for only 1 deduction in handicap but I would like it to deduct progressively.

39 points -1
40 points - 2
41 points -3, etc

=IF(D2>38,E2-1,E2)

39 10 9