<|im_start|>system
You are a helpful assistant. You first think about the reasoning process in the mind and then provide the user with the answer. You should try to truely solve the question by yourself without cheating.  <|im_end|>
<|im_start|>user
 Frankie's parents let him have many pets. He has twice as many snakes as he has cats. The number of parrots he has is one less than the number of cats, and he has one more tortoise than he has parrots. Frankie has 2 dogs, 3 hamsters, and 5 fish. The total number of pets with four legs, including the cats, is 14. How many pets does he have in total? Show your work in <think> </think> tags. And return the final answer in <answer> </answer> tags.<|im_end|>
<|im_start|>assistant
Let me solve this step by step.
<think>
user
39
Frankie's parents let him have many pets. He has twice as many snakes as he has cats. The number of parrots he has is one less than the number of cats, and he has one more tortoise than he has parrots. Frankie has 2 dogs, 3 hamsters, and 5 fish. The total number of pets with four legs, including the cats, is 14. How many pets does he have in total?
test