There are four letters and four directed envelopes. The number of ways in which all the letters can be put in the wrong envelope is