Tom and Jerry are sharing a bag of candies. Tom takes \(\frac{3}{5}\) of the candies, and Jerry takes the remaining candies. If Tom has 24 more candies than Jerry, how many candies were in the bag originally? Let's think step by step and output the final answer within \boxed{}.
user