Lizzie wants to shelve her books with the same number of books on each shelf.

If she uses five shelves, she has two books left over. If she uses six shelves, three books are left over. If she uses seven shelves, four books are left over.

If Lizzie has fewer than 314 books, how many books does she have?

Let's denote the number of books Lizzie has as x.

We know that when Lizzie uses five shelves, she has two books left over, which means x is 2 more than a multiple of 5. Therefore, we can express this as:

x ≡ 2 (mod 5)

Similarly, when Lizzie uses six shelves, she has three books left over, which means x is 3 more than a multiple of 6:

x ≡ 3 (mod 6)

And when she uses seven shelves, she has four books left over, which means x is 4 more than a multiple of 7:

x ≡ 4 (mod 7)

These three congruences can be combined into a single congruence equation:

x ≡ 2 (mod 5)
x ≡ 3 (mod 6) -> x ≡ 3 (mod 5) -> x ≡ 3 (mod 30) -> 3 ≡ 3 (mod 30)
x ≡ 4 (mod 7) -> x ≡ 4 (mod 35) -> 4 ≡ 4 (mod 35)

To solve these congruences, we can use the Chinese Remainder Theorem:

x ≡ 2*6*35 inv(6*35, 5) + 3*5*35 inv(5*35, 6) + 4*5*6 inv(5*6, 7) ≡ 208 ≡ 2 (mod 210)

Therefore, Lizzie has 208 books.