Deuteronomy 23:10-11
23:10 If there is someone among you who is impure because of some nocturnal emission, he must leave the camp; he may not reenter it immediately.
23:11 When evening arrives he must wash himself with water and then at sunset he may reenter the camp.