A boypicked a number of mangoes from theirorchard. On the way home, he met three friends, one after another. To each friend, he gave half the number of mangoes that he still has, plus 2 more. Finally, the boy had 1 mango left for him. How many mangoes did he originally have?