#include using namespace std; #define ll long long #define MOD 1000000007 #define INF 1e18 #define pi pair #define pb push_back #define F first #define S second #define sc(x) scanf("%lld",&x) vector a; ll ans[100010]; int main(){ ll n,k,temp; cin>>n>>k; a.push_back(0); for(int i=0;i>temp; a.push_back(temp); } for(int i=1;i<=n;i++){ ans[i]=-1; } for(int i=1;i<=n;i++){ ll ma=a[i]; ll mi=a[i]; ll orr=a[i]; ll andd=a[i]; for(int j=i;j<=n;j++){ ma=max(ma,a[j]); mi=min(mi,a[j]); orr=orr|a[j]; andd=andd&a[j]; // cout<<(orr+mi-andd-ma)<<" "; if((orr+mi-andd-ma)>=k){ for(int f=i;f<=j;f++){ ans[f]=max(ans[f],j-i+1LL); } } } // cout<