sex after c section?

How soon can you have sex after a c section? mine was unplanned and had to have one i was 8cm dialated when i went in for a c section.