Problem: There are N non-negative integers written on the blackboard: A_1, ..., A_N.

Snuke can perform the following two operations at most K times in total in any order:

* Operation A: Replace each integer X on the blackboard with X divided by 2, rounded down to the nearest integer.
* Operation B: Replace each integer X on the blackboard with X minus 1. This operation cannot be performed if one or more 0s are written on the blackboard.



Find the number of the different possible combinations of integers written on the blackboard after Snuke performs the operations, modulo 1,000,000,007.

Constraints

* 1 \leq N \leq 200
* 1 \leq A_i \leq 10^{18}
* 1 \leq K \leq 10^{18}
* A_i and K are integers.

Input

Input is given from Standard Input in the following format:


N K
A_1 A_2 ... A_N


Output

Print the number of the different possible combinations of integers written on the blackboard after Snuke performs the operations, modulo 1,000,000,007.

Examples

Input

2 2
5 7


Output

6


Input

3 4
10 13 22


Output

20


Input

1 100
10


Output

11


Input

10 123456789012345678
228344079825412349 478465001534875275 398048921164061989 329102208281783917 779698519704384319 617456682030809556 561259383338846380 254083246422083141 458181156833851984 502254767369499613


Output

164286011

Solution (in CPP):

Solution:
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
#define rep(i,a,b) for(i=a;i<=b;i++)
using namespace std;
typedef long long ll;
const int mod1=1e9+7,mod2=1e9+9,base=37,mod=1e9+7;
const int N=410,M=12010;
const ll INF=1000000000000000000ll;
ll a[N],b[N],c[N];
ll R[M][N],L[M][N];int cnt[M];int tot;
int kk[N];
int n;ll K;
int ans;
struct H{
	int x1,x2;
	H(){}
	H(int x1,int x2):x1(x1),x2(x2){}
	H operator + (H h){return H((x1+h.x1)%mod1,(x2+h.x2)%mod2);}
	H operator * (H h){return H(1ll*x1*h.x1%mod1,1ll*x2*h.x2%mod2);}
	friend bool operator < (H h1,H h2){return h1.x1<h2.x1||(h1.x1==h2.x1&&h1.x2<h2.x2);}
};
map<H,int> mp;

H code(ll a[],ll mx){
	int i;H ret=H(0,0);
	rep(i,1,n)	ret=ret*H(base,base)+H((a[i]-mx)%mod1,(a[i]-mx)%mod2);
	return ret;
}

void solve(int id){
	//static ll L[N],R[N];static int cnt;
	static int c[N];static ll kk[N];static int ck;
	int i,x;
	ck=0;
	rep(i,1,cnt[id])	kk[++ck]=L[id][i],kk[++ck]=R[id][i]+1;
	sort(kk+1,kk+1+ck);ck=unique(kk+1,kk+1+ck)-kk-1;
	rep(i,1,cnt[id]){
		x=lower_bound(kk+1,kk+1+ck,L[id][i])-kk;c[x]++;
		x=lower_bound(kk+1,kk+1+ck,R[id][i]+1)-kk;c[x]--;
	}
	rep(i,1,ck-1){
		c[i]+=c[i-1];
		if(c[i])	ans=(1ll*ans+kk[i+1]-kk[i])%mod;
	}
}

int calc(ll l,ll r){
	int ret=0;int i;int opt1,opt2;
	for(i=60;i>=0;i--){
		opt1=r>>i&1;opt2=l>>i&1;
		if(!opt1&&!opt2)	continue;
		if(opt1&&opt2)	ret++;
		else return ret+1;
	}
}

bool cmp(int aa,int bb){return c[aa]<c[bb];}

void work(int p){
	ll mx=INF;int i,x;H hsh;int now;
	rep(i,1,n)	b[i]=a[i]>>p,mx=min(mx,b[i]);
	rep(i,1,n)	c[i]=a[i]&((1ll<<p)-1);
	rep(i,1,n)	kk[i]=i;
	sort(kk+1,kk+1+n,cmp);
	hsh=code(b,mx);
	if(!mp[hsh])	mp[hsh]=++tot;
	now=mp[hsh];
	cnt[now]++;R[now][cnt[now]]=mx;L[now][cnt[now]]=max(mx-(K-p),0ll);
	//rep(i,1,n)	printf("%lld ",b[i]-mx);printf("\n");
	//printf("%lld %lld\n",L[now][cnt[now]],R[now][cnt[now]]);
	rep(i,1,n-1){
		if(!b[kk[i]])	break;
		b[kk[i]]--;mx=min(mx,b[kk[i]]);
		if(c[kk[i]]>=c[kk[i+1]])	continue;
		x=calc(c[kk[i]],c[kk[i+1]]);
		if(x>K-p)	continue;
		hsh=code(b,mx);
		if(!mp[hsh])	mp[hsh]=++tot;
		now=mp[hsh];
		cnt[now]++;R[now][cnt[now]]=mx;L[now][cnt[now]]=max(mx-(K-x-p),0ll);
		//rep(i,1,n)	printf("%lld ",b[i]-mx);printf("\n");
		//printf("%lld %lld\n",L[now][cnt[now]],R[now][cnt[now]]);
	}
}
	
int main(){
	//freopen("a.in","r",stdin);
	//freopen("a.out","w",stdout);
	int i;map<H,int>::iterator it;
	scanf("%d%lld",&n,&K);
	rep(i,1,n)	scanf("%lld",&a[i]);
	rep(i,0,60) if(i<=K) work(i);
	for(it=mp.begin();it!=mp.end();it++)	solve(it->second);
	printf("%d\n",ans);
}