In this talk we consider the quantum XX spin chain in its ground state and in the thermodynamic limit. In 2007, A.R. Its, B.-Q. Jin and V.E. Korepin calculated the asymptotic behaviour of the entanglement entropy of an interval of length n (i.e. a block of n consecutive particles) as n tends to infinity. It is a very natural question what happens if we consider a more complicated subsystem of particles, for instance, a union of two intervals? In my talk I will present our most recent result on the case when the subsystem is such a union, where the first interval has length m, the second has length n, and the two intervals are separated by a gap of fixed length 1. Namely, we calculate the mutual information between the two intervals as m,n tend to infinity, and hence compute the limiting entropy of the mentioned subsystem. We will see that this problem leads to a rather complicated mathematical problem, namely, to the estimation of a certain inner product involving a Toeplitz matrix whose symbol possesses Fisher-Hartwig singularities. Using techniques from the theory of integrable operators we connect this problem first to the famous Fokas-Its-Kitaev Riemann-Hilbert problem, and then to the R-Riemann-Hilbert problem appearing in the celebrated 2011 paper of P. Deift, A.R. Its and I. Krasovsky, in which they solved the Fisher-Hartwig conjecture. A joint work with A.R. Its, V.E. Korepin, F. Mezzadri, J. Virtanen.