maximum number of line segments