Solution
= Solution
Gauge invariance gives $Q\int\mathcal L=0$. Nilpotence gives $Q^2\Psi=0$, and therefore
$$
QS=Q\int\mathcal L+Q^2\Psi=0.
$$
Thus writing the gauge-fixing contribution as a BRST-exact term makes the complete action <BRST symmetry>[BRST invariant].