How many days?

How many days after unprotected sex should i wait to take a test?