you're gaining weight because muscle weighs more than fat since muscle is denser, so you will get heavier during the first few stages of exercising, but eventually, the fat will melt and you will get lighter again. But right now, you will be getting heavier.