How long should I wait?

I went to the doctor today because I was 5 weeks pregnant and bleeding with bad cramps. They did an ultrasound and didn't see anything so they said it was most likely a failed pregnancy. I forgot to ask the doctor how long my husband and I should wait to try to conceive again after a miscarriage. Does anyone know? Thanks.