Jacob, Thomas and Harry shared a box of marbles. The number of marbles Jacob took was 4 more than 1/3 of the marbles in the box. The number of marbles Thomas took was 12 more than 1/2 of the remaining marbles. Harry took the last 8 marbles that were left. How many marbles were there in the box?