A cube is painted on all six faces and then cut into 27 smaller cubes. How many of the smaller cubes have exactly one face painted?