You need to specify the rules clearly. For example, are you allowed to make one bet (of \20), keep any winnings, have the bet refunded if you lose, and then things go on without any offer? Or do you get to bet, keep the winnings, and have the first loss refunded?
For the first, if the probability of winning is p$ and the payoff is $r$ (both as ratios of your bet), a fair bet would have $pr=1$ and you would expect $r$ to be a bit less than $1/p$ for them to make a profit. The payoff to you with the refund is $(1-p)+pr$. To maximize this, you want $r$ to be large, $p to be small, and them to take a small profit. So bet a long shot that gives reasonable odds. Finding such is left as an exercise, as it is not mathematics.
For the second, you get \20 back whenever you lose first, which you will do sometime, so it is just money in the bank. Just make sure you always bet \$20 until you lose the first time.