Sam has been appointed as the new Librarian in a library. He needs to perform the following operations on the N books arranged in the bookshelves to get a unique combination of books:
Given an array A which represents the N books in the bookshelves, your task is to help Sam find and return an integer value representing all the possible unique combinations of books that can be generated.