Pregnant after mc?

Can you get pregnant after you mc in a short time? Or is there a risk to it?