Farmer John's cows share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a list of only different features . For example, cows exhibiting feature #1 might have spots, cows exhibiting feature #2 might prefer C to Pascal, and so on. FJ has even devised a concise way to describe each cow in terms of its "feature ID", a single k-bit integer whose binary representation tells us the set of features exhibited by the cow. As an example, suppose a cow has feature ID = . Since written in binary is , this means our cow exhibits features , , and (reading right to left), but not feature . More generally, we find a in the place if a cow exhibits feature . Always the sensitive fellow, FJ lined up cows in a long row and noticed that certain ranges of cows are somewhat "balanced" in terms of the features the exhibit. A contiguous range of cows is balanced if each of the possible features is exhibited by the same number of cows in the range. FJ is curious as to the size of the largest balanced range of cows. See if you can determine it.
Lines : Line contains a single -bit integer specifying the features present in cow . The least-significant bit of this integer is if the cow exhibits feature #1, and the most-significant bit is if the cow exhibits feature #k.
输出格式
Line : A single integer giving the size of the largest contiguous balanced group of cows.
样例
样例输入 #1
7 3
7
6
7
2
1
4
2
样例输出 #1
4
样例说明
INPUT DETAILS:
The line has cows with features; the table below summarizes the correspondence:
Feature :
Feature :
Feature :
key:
Cow #:
OUTPUT DETAILS:
In the range from cow #3 to cow #6 (of size ), each feature appears in exactly cows in this range: