I will try to take a few books from the third pile to the fourth pile to increase the number of books in the fourth pile. If I take out x books and move them to the fourth pile, the number of books in the first and second piles will decrease. Therefore, we can write the following equation: 17 - x = 6 - (2 - x) If you solve this equation, you can get x = 1. Therefore, I took out a book and placed it in the fourth pile, increasing the number of books in the fourth pile by one. Now, there were 18 books in the fourth pile, six books in the second pile, and seven books in the first and third piles.