Some cubes were put together to form a larger cuboid.The larger cuboid was then painted. How many small cubes has exactly two faces painted?