In the class, there are $a_{1}$ students who received at least one two during the year, $a_{2}$ students who received at least two twos, ..., $a_{k}$ students who received at least $k$ twos. How many twos are there in total in this class?

(It is assumed that no one has more than $k$ twos.)
The number of students who received exactly one two is $a_{1}-a_{2}$, exactly two twos is $-a_{2}-a_{3}$, and so on.

Therefore, the total number of twos is

$\left(a_{1}-a_{2}\right)+2\left(a_{2}-a_{3}\right)+3\left(a_{3}-a_{4}\right)+\ldots+(k-1)\left(a_{k-1}-a_{k}\right)+k a_{k}=a_{1}+\left(2 a_{2}-a_{2}\right)+\left(3 a_{3}-2 a_{3}\right)+\left(k a_{k}-(k-1) a_{k}\right)=a_{1}$

$+a_{2}+\ldots+a_{k}$

## Answer

$a_{1}+a_{2}+\ldots+a_{k}$

## Problem