A Simple Calculation of the Determinant Polynomial of General Networks