If the average of 5, 6, 7 and w is 10, What is the value of w?

(A) 8
(B) 22
(C) 14
(D) 16 

Answer: (B) 22