This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] The inequality for all $x,y$ (and its swap) forces equality: $g(x)=f(x)-\ln x-x$ is constant, so $f'(x)=\frac1x+1$. $f'\left(\frac1{n^2}\right)=n^2+1$. $\sum_{n=1}^{20}(n^2+1)=2870+20=2890$. Answer: 2890.