Triangle A B C_{0} has a right angle at C_{0}. Its side lengths are pairwise relatively prime positive integers, and its perimeter is p. Let C_{1} be the foot of the altitude to \overline{A B}, and for n \geq 2, let C_{n} be the foot of the altitude to \overline{C_{n-2} B} in \triangle C_{n-2} C_{n-1} B. The sum \sum_{n=1}^{\infty} C_{n-1} C_{n}=6 p. Find p.