Where does the extra candy come from when I evolve a pokemon?

You have one extra candy because you get one candy for evolving pokemon. You still need 50 candies to evolve a Voltorb, but you get one candy back for evolving him.