A local animal shelter is preparing for an adoption event. They have three times as many cats as dogs, and twice as many rabbits as cats. If there are 12 dogs at the shelter, how many animals are there in total? Let's think step by step and output the final answer within \boxed{}.
user