## Task 2 - 030812

When asked by his parents about the result of the last math test, Klaus remembers that 5 students received a grade of 1, 8 students received a grade of 2, 4 students received a grade of 4, and the remaining students received a grade of 3. He also recalls that the average grade was exactly 2.5.

How many students took the test?
Number of students who scored a 3: $x$

Number of students: $n=5+8+4+x=17+x$

Average grade: $d=2.5=(5 \cdot 1+8 \cdot 2+x \cdot 3+4 \cdot 4) / n$

$$
\begin{aligned}
2.5 & =(5 \cdot 1+8 \cdot 2+x \cdot 3+4 \cdot 4) /(17+x) \\
2.5 & =(5+16+x \cdot 3+16) /(17+x) \\
42.5+2.5 \cdot x & =37+x \cdot 3 \\
5.5 & =0.5 \cdot x \\
11 & =x
\end{aligned}
$$

$n=17+x=17+11=28$. 28 students took the test.