Pregnancy Test help

How long do I have to wait to take a pregnancy test after unprotected sex?