2004 AIME II Problem 3

A solid rectangular block is formed by gluing together N congruent 1-cm cubes face to face. When the block is viewed so that three of its faces are visible, exactly 231 of the 1-cm cubes cannot be seen. Find the smallest possible value of N.