Pregnancy test

When's the earliest you can take a pregnancy test after unprotected sex