You will gain some back, because you have to fill up your alimentary canal, and restock your body.
If you want to get to a certain weight, fast until you are about 5 or 6 pounds
less than your target weight.
In theory, you could go on a very severe diet at the end of your fast, thus losing an equal amount of weight in fat each day to offset the weight of the the fluids etc that you will regain, but why bother, let nature take its course, it is easier to fast a few days longer or at a later date (and a lot healthier).
I tried that once, and it was torture, and pointless, I thought. Much easier just to fast again.
To minimise the weight gain, eat very carefully, and in small amounts. Chris has also mentioned rotating foods.