import time import random #https://qiita.com/zawawahoge/items/8bbd4c2319e7f7746266 def Popcount(x): '''xの立っているビット数をカウントする関数 (xは64bit整数)''' # 2bitごとの組に分け、立っているビット数を2bitで表現する x = x - ((x >> 1) & 0x5555555555555555) # 4bit整数に 上位2bit + 下位2bit を計算した値を入れる x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333) x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f # 8bitごと x = x + (x >> 8) # 16bitごと x = x + (x >> 16) # 32bitごと x = x + (x >> 32) # 64bitごと = 全部の合計 return x & 0x0000007f t1 = time.time() n = int(input()) a = list(map(int,input().split())) b = [] ans = 1 while time.time() - t1 < 1.9: if len(b) == 0 or (random.random() < 0.95 and time.time() - t1 < 1.5): if len(a) == 0: break now = random.choice(a) flag = True for v in b: if Popcount(v ^ now) == 1: flag = False if flag: a.remove(now) b.append(now) else: now = random.choice(b) b.remove(now) a.append(now) ans = max(ans, len(b)) print(ans)