When can a subsituted player re-enter the basketball game?

At the next dead ball