Andy's marbles

Andy had a big bag of marbles but unfortunately the bottom of it split and all the marbles spilled out. Use the information to find out how many there were in the bag originally.

Problem

Andy and his friend Sam were walking along the road together. Andy had a big bag of marbles.

Image

Unfortunately the bottom of the bag split and all the marbles spilled out. Poor Andy!

Image

One third ($\frac{1}{3}$) of the marbles rolled down the slope too quickly for Andy to pick them up. One sixth ($\frac{1}{6}$) of all the marbles disappeared into the rain-water drain.

Andy and Sam picked up all they could but half ($\frac{1}{2}$) of the marbles that remained nearby were picked up by other children who ran off with them.

Andy counted all the marbles he and Sam had rescued.

Image

He gave one third ($\frac{1}{3}$) of these to Sam for helping him pick them up. Andy put his remaining marbles into his pocket. There were $14$ of them.

How many marbles were there in Andy's bag before the bottom split?

What fraction of the total number that had been in the bag had he lost or given away?