Show that for any flow $f$ in a netowrk $N$ with vertice set $V$, arc set $A$, and source and sink sets $X,Y$ respectively that for any $S \subset V$,
$\sum_{v \in S}(f^{out}(v) - f^{in}(v)) = f^{out}(S) - f^{in}(S)$.
Clearly by the definition of a flow if $v \notin X \cup Y$ then $f^{out}(v) - f^{in}(v) = 0$, so this amounts to proving $\sum_{v \in S \cap ( X \cup Y)}(f^{out}(v) - f^{in}(v))=f^{out}(S) - f^{in}(S)$ but I am not sure how to proceed.