what is the quickest way of putting on weight whenever your on medication?

im on medication for epilepsy and there is quite alot of it and i was diagnosed with anoerxica nervosa 3 years ago because im underweight for my height and i was wondering do you know what the quickest way would be for me to put on weight
(i would also walk my dog who is a huskey 4 days a week so i can c ma bf)
i would also eat alot of junk food yet it still doesnt seem to put any weight on