On the same side of a street, six adjacent houses will be built. The houses can be brick or wooden, but as a safety measure against fire, two wooden houses cannot be adjacent. In how many ways can the construction of these houses be planned?
As the houses are neighbors, we can think of them as a row of houses with six positions. Let's divide the count into cases, according to the number of wooden houses that can be built.

(a) No wooden houses: here there is only one way to build the houses, that is, all of them are masonry.
(b) One wooden house: here we have six ways to build the houses, as the wooden house can be any one of them, with the others being masonry.

(c) Two wooden houses: the wooden houses can occupy the following positions: 1 and 3, 1 and 4, 1 and 5, 1 and 6, 2 and 4, 2 and 5, 2 and 6, 3 and 5, 3 and 6, or 4 and 6. Here we have 10 ways.

(d) Three wooden houses: the wooden houses can occupy the following positions: 1, 3, and 5; 1, 3, and 6; 1, 4, and 6; 2, 4, and 6. Here we have four ways.

(e) Four or more wooden houses: impossible, as it is easy to see that in this case, we will always have two wooden houses adjacent.

Thus, there are $1+6+10+4=21$ ways to plan the construction.