In an examination held by Sherwood Boarding School, the maximum marks for each of three papers is n and that for the fourth paper is 2n. Find the number of ways in which a candidate can get 3n marks.

Ans. (n+1)(5n^{2}+10n+6)

I'm stumped on this one. I tried hard but was unable to solve this algebraically . How should we approach this algebraically ? Request an algebraic solution.

Thanks in advance !