Caleb had 37 more marbles than David at first. Caleb gave away 4 times as many marbles as David. David was left with 5 more than the number of marbles he gave away. Caleb had twice as many marbles left as David. How many marbles did Caleb have in the end?