(5) بَابُ قَوْلِ اللَّهِ تَعَالَى: {فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ فَفِدْيَةٌ مِنْ صِيَامٍ أَوْ صَدَقَةٍ أَوْ نُسُكٍ} وَهُوَ مُخَيَّرٌ، فَأَمَّا الصَّوْمُ فَثَلاَثَةُ أَيَّامٍ
Narrated `Abdur-Rahman bin Abu Layla:
Ka`b bin 'Ujra said that Allah's Messenger (ﷺ) said to him (Ka`b), "Perhaps your lice have troubled you?" Ka`b replied, "Yes! O Allah's Messenger (ﷺ)." Allah's Messenger (ﷺ) said, "Have your head shaved and then either fast three days or feed six poor persons or slaughter one sheep as a sacrifice."
Reference: Sahih al-Bukhari 1814
In-book reference: Book 27, Hadith 9
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 28, Hadith 41