The faces of a cube are to be numbered with integers 1 through 6 in such a way that consecutive numbers are always on adjacent faces (not opposite ones). The face numbered 1 is on top and the face numbered 2 is toward the front. In how many different ways can the remaining faces be numbered?