I may be guilty of promoting myself here....but it's not for profit so I think it's OK.
If you look in the MHF software forum you will find a little program I wrote. I think it would be useful to you.
You can get the answer to your problem using the program but that's not really the point.
If you play around with it a little you might understand the question better.
As for answering the question properly...
Do you know how to calculate P(D=0) or P(D=1) for example?