The mean field theory of the three-dimensional ANNNI model