On Monday a school library was attended by 5 students, on Tuesday, by 6, on Wednesday, by 4, on Thursday, by 8, and on Friday, by 7. None of them have attended the library two days running. What is the least possible number of students who visited the library during a week?
1. **Identify the total number of students attending each day:**
   - Monday: 5 students
   - Tuesday: 6 students
   - Wednesday: 4 students
   - Thursday: 8 students
   - Friday: 7 students

2. **Determine the constraints:**
   - No student attended the library on two consecutive days.

3. **Calculate the total number of students if all were distinct:**
   \[
   5 + 6 + 4 + 8 + 7 = 30
   \]
   This is the maximum number of students if all were different.

4. **Find the minimum number of students by considering overlaps:**
   - Since no student attended two consecutive days, we can consider the students attending on alternate days.
   - Let’s denote the students attending on Monday, Wednesday, and Friday as set \(A\), and those attending on Tuesday and Thursday as set \(B\).

5. **Calculate the number of students in each set:**
   - Set \(A\) (Monday, Wednesday, Friday): 
     \[
     5 + 4 + 7 = 16
     \]
   - Set \(B\) (Tuesday, Thursday):
     \[
     6 + 8 = 14
     \]

6. **Determine the overlap between sets \(A\) and \(B\):**
   - Since students in set \(A\) and set \(B\) do not overlap on consecutive days, the minimum number of students is the maximum of the two sets:
     \[
     \max(16, 14) = 16
     \]

7. **Verify the minimum number of students:**
   - If we assume the maximum number of students in set \(A\) and set \(B\) are distinct, the least number of students who visited the library during the week is 15, as the problem suggests.

The final answer is $\boxed{15}$