Merck plans to spin off all the shares of Medco to company shareholders in the third quarter .