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<bits/stdc++.h>
using namespace std;
const long long md=1e9+7;
const int maxn=360;
const long long INF=1e18+10;
void chkmin(long long &x,long long y){
	x=x<y?x:y;
}
void chkmax(long long &x,long long y){
	x=x>y?x:y;
}
long long Max(long long x,long long y){
	return x>y?x:y;
}
struct node{
	long long v,r;
}b[maxn];
struct Range{
	long long l,r;
};
bool cmp(const node &A,const node &B){
	return A.r<B.r;
}
bool cmpl(const Range &A,const Range &B){
	return A.l<B.l;
}
long long a[maxn];
int num;
map<vector<long long>,vector<Range> > mp;
map<vector<long long>,vector<Range> >::iterator it;
long long getmnv(long long l,long long r){
	if(l>r) return INF;
	int mnv=0;
	for(int j=59;j>=0;j--){
		if((l&(1LL<<j))==(r&(1LL<<j))) mnv+=(l>>j)&1;
		else{
			if(l&((1LL<<j)-1)) mnv++;
			break;
		}
	}
	return mnv;
}
void Add(int n,int p,long long K){
	if(K<0) return;
	long long Mn=b[1].v-(1<=p);
	vector<long long> vec;
	vec.resize(n);
	for(int i=1;i<=n;i++){
		vec[i-1]=b[i].v-(i<=p);
		chkmin(Mn,vec[i-1]);
	}
	if(Mn<0) return;
	for(int i=1;i<=n;i++)
		vec[i-1]-=Mn;
	Range st=(Range){Max(Mn-K,0),Mn};
	sort(vec.begin(),vec.end());
	mp[vec].push_back(st);
	vector<Range> Vec=mp[vec];
}
int main(){
	int T,n;
	long long K;
	int nxt;
	long long l,r;
	long long ans;
		mp.clear();
		scanf("%d%lld",&n,&K);
		for(int i=1;i<=n;i++)
			scanf("%lld",&a[i]);
		for(int k=0;k<=60;k++){
			for(int i=1;i<=n;i++){
				b[i].v=a[i]>>k;
				b[i].r=a[i]&((1LL<<k)-1);
			}
			sort(b+1,b+n+1,cmp);
			l=0;
			for(int i=1;i<=n;i=nxt+1,l=r+1){
				nxt=i;
				while(nxt<n&&b[nxt+1].r==b[i].r) nxt++;
				r=b[i].r;
				Add(n,i-1,K-getmnv(l,r)-k);
			}
		}
		ans=0;
		vector<Range> vec;
		vector<long long> Vec;
		for(it=mp.begin();it!=mp.end();it++){
			vec=it->second;
			l=0,r=-1;
			sort(vec.begin(),vec.end(),cmpl);
			for(int j=0;j<(int)vec.size();j++){
				if(vec[j].l>r){
					ans=(ans+((r-l+1)%md))%md;
					l=vec[j].l,r=vec[j].r;
				}
				else chkmax(r,vec[j].r);
			}
			ans=(ans+((r-l+1)%md))%md;
		}
		printf("%lld\n",ans);
	return 0;
}