كتاب الرقاق
To make the Heart Tender (Ar-Riqaq)
Chapter: The gathering (on the Day of Resurrection)
باب كَيْفَ الْحَشْرُ
Sahih al-Bukhari 6522

Narrated Abu Huraira:

The Prophet (ﷺ) said, "The people will be gathered in three ways: (The first way will be of) those who will wish or have a hope (for Paradise) and will have a fear (of punishment), (The second batch will be those who will gather) riding two on a camel or three on a camel or ten on a camel. (The third batch) the rest of the people will be urged to gather by the Fire which will accompany them at the time of their afternoon nap and stay with them where they will spend the night, and will be with them in the morning wherever they may be then, and will be with them in the afternoon wherever they may be then."

حَدَّثَنَا مُعَلَّى بْنُ أَسَدٍ، حَدَّثَنَا وُهَيْبٌ، عَنِ ابْنِ طَاوُسٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ يُحْشَرُ النَّاسُ عَلَى ثَلاَثِ طَرَائِقَ، رَاغِبِينَ رَاهِبِينَ وَاثْنَانِ عَلَى بَعِيرٍ، وَثَلاَثَةٌ عَلَى بَعِيرٍ، وَأَرْبَعَةٌ عَلَى بَعِيرٍ، وَعَشَرَةٌ عَلَى بَعِيرٍ وَيَحْشُرُ بَقِيَّتَهُمُ النَّارُ، تَقِيلُ مَعَهُمْ حَيْثُ قَالُوا، وَتَبِيتُ مَعَهُمْ حَيْثُ بَاتُوا، وَتُصْبِحُ مَعَهُمْ حَيْثُ أَصْبَحُوا، وَتُمْسِي مَعَهُمْ حَيْثُ أَمْسَوْا ‏"‏‏.‏
Reference : Sahih al-Bukhari 6522
In-book reference : Book 81, Hadith 111
USC-MSA web (English) reference : Vol. 8, Book 76, Hadith 529
  (deprecated numbering scheme)