<|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
 In a group of 86 students, each student is registered for at least one of 3 classes – history, math and English. 20 - 8 students are registered for history, 20 - 3 students are registered for math, and forty - 4 students are registered for English. Some students are registered for all 3 classes. There are 3 students registered for exactly two classes. How many students are registered for all 3 classes? 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
24
In a group of 86 students, each student is registered for at least one of 3 classes – history, math and English. 20 - 8 students are registered for history, 20 - 3 students are registered for math, and forty - 4 students are registered for English. Some students are registered for all 3 classes. There are 3 students registered for exactly two classes. How many students are registered for all 3 classes?
test