The Integer Brick Problem