5. Given $f(x)=\frac{\left(2^{x}+1\right)^{2}}{2^{x} \cdot x}+1$ on $[-2018,0) \cup(0,2018]$, the maximum value is $M$, and the minimum value is $N$, then $M+N$ ( )



Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
Answer $\mathrm{B}$.
Analysis The graph of $f(x)$ is symmetric about $(0,1)$, so $M+N=f(x)_{\max }+f(x)_{\min }=2$.