In my opinion the problem statement is quite unclear. Although it is said in it that the book might fall at some point it never does (even if it goes beyond the line where physic laws say it falls). The problem my team was solving during the contest was to determine when the book will fall if it falls (and at what X this would happen), and if it doesn't - what is the furthest point to the left the middle of it can go while sliding over the shelf (the original problem). Please change the statement so other people are not confused by this ambiguity.
The value of L is non-information. The text suggests the book may fall, but to solve the problem you have to pretend it doesn't (zero gravity, weightless book, magical forces). I propose that the problem setter should shelve books for the rest of his life and stay away from programming.