Derive the method of moments estimator for pi for a sample of size n from a NBinom(r, pi)-distribution. (Treat r as known, as it would be in a typical situation where you would be collecting data by repeating the Bernoulli trials.)

I have no idea where to start. Help!