The total number of pencils that is available all together = 684 pencils.
Number of boxes of pencils found = 12
Each box contains = 12 pencils
The total number of students = 54
Each student brought = 10 pencils
The total number of pencils all together = Total number of pencils from all students + total number of pencils in all boxes
Total number of pencils in all boxes:

Total number of pencils from all students:

The total number of pencils all together = 144 + 540
The total number of pencils that is available all together = 684 pencils