I'll shorthand some things, like "amount of salt". So right now, there's V amount of water in the reservoir. If it's at 50% salinity, that means there's V/2 amount of salt in it:

Salinity = salt/water = X/V = 1/2, salt therefore is V/2.

Every time you do your 20% swap, you're taking out 20% of the remaining salt (leaving 80% of what was there), but the volume of water is always the same, so the new salinity is:

Salinity = salt/water = [ (V/2) x (0.8)^n ] / V = (0.8)^n x 0.5, where n is the number of times you swap in new water.

If salinity is less than 1%:

(0.8)^n x 0.5 < 0.01

(0.8)^n < 0.02

n x log 0.8 < log 0.02 (if you remember your logarithms)

n > log 0.02 / log 0.8 (log of a number less than 1 is negative, so flip the inequality when you divide)

n > 17.5

It'd take 18 swaps minimum.