General Version of Bézout's Lemma