Given an array with non-negative integers (),find the longest subsequence , where & is not .
NOTE: & is the bitwise and operation. A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. The two adjacent elements in the subsequence don't have to be consecutive in the original array .
The first line consists of one integer () The second line consists of non-negative integers, ()
One integer, the longest length of the subsequence .
Sample Input 1
4 1 2 3 4
Sample Output 1
Sample Input 2
8 1 2 1 2 1 2 1 4
Sample Output 2