John entered a cross-country ski race. The first part of the race was 14 km long, and he completed it in 1 hour. The second part was 18 km long, and he completed this part in an hour and a half. What was John's average speed for the whole race?
A.
12.8 kilometers per hour
B.
26 kilometers per hour
C.
27.3 kilometers per hour