A library has a collection of books. Initially, 60% of the books are fiction and the remaining are non-fiction. After donating 40 fiction books and adding 20 non-fiction books, the percentage of fiction books in the collection becomes 55%. How many books were in the library initially? Let's think step by step and output the final answer within \boxed{}.
user