Hanbit Media (Easy)
InterviewTime limit1sMemory limit1024 MB
Given N book prices, split the books into the fewest pages so that no page holds two prices that differ by a factor of two or more.
Problem
This problem has different input and output constraints from "Hanbit Media (Hard)".
Hanbit Media Co., Ltd. builds an IT world with books. The protagonists of the IT world are "we." Hanbit Media publishes books in many fields for IT professionals, including programming, computer science, IT essays, Make, Realtime (e-books), OA, graphics, and practical books for oneself and one's children.
Sanjini graduated from university and received a request from Hanbit Media, which has sponsored the Pusan National University programming contest since 2022. The request was to develop a book display program for a website that uses the database of books Hanbit Media has published. Sanjini gladly accepted and started developing the program. The books in the database are displayed on the website's pages according to the rules below.
- A page on the website must display at least one kind of book.
- Two books whose prices differ by a factor of two or more cannot be displayed on the same page. For example, a book priced won can be displayed with a book priced won, but not with a book priced won.
Sanjini believes customers will have trouble finding books when many pages display them, so Sanjini decided to minimize the number of pages that display books. Help Sanjini!
Input
The first line contains an integer , the number of books.
The second line contains the price of the -th book, separated by spaces.
Output
Print the minimum number of pages needed to display all books.
