There were 110 books in two bookshelves. If we put half of the books from bookshelf B to bookshelf A, then there will be four times more books in bookshelf A, than there is now in bookshelf B. How many books were in the bookshelves in the beginning?