What are the chances?

Question: How many times must A occur in order for C to occur 3 times and D to occur once?

Every time A occurs, there is a 1 in 2,500 chance that B will occur.

Every time B occurs, there is a 1 in 1,250 chance that C will occur, and a 1 in 3,017 chance that D will occur (C and D cannot occur at the same time).