The total number of cases is 6×6×6×=63=216. The number of favourable ways
= coefficient of xk in (x+x2+....+x6)3
= coefficient of xk−3 in (1−x6)3(1−x)−3
= coefficient of xk−3 in (1−3x6)(1+3C1x+4C2x2+5C3x3+...)
[note that 6≤k−3≤11]
=k−3+2Ck−3−(3)k−3+2−6Ck−3−6
=k−1C2−(3)k−7C2
Now P(k)=21k−k2−83216
∴S=3554.