Sahih al-Bukhari, Book 30, Hadith 104 (Bukhari 1926)

Narrated Ibn `Umar:

Fasting for those who perform ,Hajj-at-Tamattu` (in lieu of the Hadi which they cannot afford) may be performed up to the day of `Arafat. And if one does not get a Hadi and has not fasted (before the `Id) then one should fast of the days of Mina. (11, 12 and 13th of Dhul Hajja).