Miscarriage and sex

How long after having a miscarriage can you have sex again ?