  We prove that the Riemann hypothesis is equivalent to the condition
$\int_{2}^x\left(\pi(t)-\text{li}(t)\right)\mathrm{d}t<0$ for all $x>2$. Here,
$\pi(t)$ is the prime-counting function and $\text{li}(t)$ is the logarithmic
integral. This makes explicit a claim of Pintz (1991). Moreover, we prove an
analogous result for the Chebyshev function $\theta(t)$ and discuss the extent
to which one can make related claims unconditionally.
