Double Up
InterviewTime limit2sMemory limit1024 MB
Each number can only be doubled into values that share its odd part, so the task is to find the largest group of numbers with the same odd part.
Problem
You are given a sequence of positive integers. Dal-gu can pick one number from this sequence and multiply it by . He can repeat this operation as many times as he wants.
After Dal-gu finishes all operations, let be the number that appears most often in the array. If several numbers tie for the most appearances, is the largest of them. Find the maximum possible number of appearances of .
Input
The first line contains the length of the sequence .
The second line contains positive integers separated by spaces.
Output
After performing any number of operations, print the maximum possible number of appearances of the most frequent number in the array.