Abu Dawud Book 1, Hadith Number 343.

Chapter : A person who is sexually defiled is permitted to eat anything before washing.

Narated By Abu Sa’id al-Khudri and Abu Hurairah : The Apostle of Allah (PBUH) said: If anyone takes a bath on Friday, puts on his best clothes, applies a touch of perfume if he has any, then goes to the congregational prayer (in the mosque), and takes care not to step over people, then prays what Allah has prescribed for him, then keeps silent for the time his Imam comes out until he finishes his prayer, it would atone for his sins during the previous week.

Abu Hurairah said: (It would atone for his sins) for three days more. He further said: One is rewarded ten times for doing good work.

Abu Dawud said: The version narrated by Muhammad b. Salamah is perfect, and Hammad did not make a mention of the statement of Abu Hurairah.