Well there are two formulas you can use for a sequence like that:

The nth term in an arithmetic progression:

where a is the original value of the progression (20 in that case) and d is the constant (or difference) between each progression, which is a negative value in that example.

To find the sum of n terms you can use:

But in your case you already have the sum so you could plug 800 in and solve for n?

Been doing sequences allllll morning.