A survey recorded the number of hours 8 students spent studying: 3, 5, 7, 2, 8, 5, 6, 4.What is the median number of hours?