How can i prove this ?

How can i prove that solution to this problem is atleast n-1 (n is total number of subjects)?
link to the problem is https://www.codechef.com/EXTE2015/problems/PMARK