  We propose an $N$-photon Gaussian measurement scheme which allows the
estimation of a parameter $\varphi$ encoded into a multi-port interferometer
with a Heisenberg scaling precision (i.e. of order $1/N$). In this protocol, no
restrictions on the structure of the interferometer are imposed other than
linearity and passivity, allowing the parameter $\varphi$ to be distributed
over several components. In all previous proposals Heisenberg scaling has been
obtained provided that both the input state and the measurement at the output
are suitably adapted to the unknown parameter $\varphi$. This is a serious
drawback which would require in practice the use of iterative procedures with a
sequence of trial input states and measurements, which involve an unquantified
use of additional resources. Remarkably, we find that only one stage has to be
adapted, which leaves the choice of the other stage completely arbitrary. We
also show that our scheme is robust against imperfections in the optimized
stage. Moreover, we show that the adaptive procedure only requires a
preliminary classical knowledge (i.e to a precision $1/\sqrt{N}$) on the
parameter, and no further additional resources. As a consequence, the same
adapted stage can be employed to monitor with Heisenberg-limited precision any
variation of the parameter of the order of $1/\sqrt{N}$ without any further
adaptation.
