An Integral Riemann-Roch Formula for Flat Line Bundles