A farmer is planning to plant trees in his orchard. He wants to plant trees in rows, with each row having the same number of trees. If he plants 3 rows, he will have a total of 24 trees. How many trees will he have if he plants 5 rows, assuming the number of trees per row remains constant? Let's think step by step and output the final answer within \boxed{}.
user