Jacob has three times as many marbles as David. David has 7 fewer marbles than Sarah. If Sarah has 24 marbles, how many marbles do they have altogether? Let's think step by step and output the final answer within \boxed{}.
user