Jami` at-Tirmidhi, Book 17, Hadith 25 (Tirmidhi 1463)

Narrated Abu Sa'eed Al-Khudri:

That the Messenger of Allah (ﷺ) implemented the penalty by beating forty times, with two shoes - Mis'ar (one of the narrators) said: "It think it was for wine."