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;
#define REP(i,st,ed) for(int i=(int)(st),i##end=(int)(ed);i<=i##end;++i)
#define DREP(i,st,ed) for(int i=(int)(st),i##end=(int)(ed);i>=i##end;--i)
template<typename T>bool chkmin(T &x,const T &y){return x>y?x=y,1:0;}
template<typename T>bool chkmax(T &x,const T &y){return x<y?x=y,1:0;}
#ifdef __linux__
#define getchar getchar_unlocked
#define putchar putchar_unlocked
#endif
template<typename T>T read(){
	T x=0,f=1;
	char c=getchar();
	while((c<'0')||(c>'9')){if(c=='-')f=-1;c=getchar();}
	while((c>='0')&&(c<='9'))x=(x<<1)+(x<<3)+(c^48),c=getchar();
	return x*f;
}
#define read() read<int>()
template<typename T>void write(T x,char c){
	static char t[25];
	static int tlen;
	t[tlen=1]=c;
	if(x<0)putchar('-'),x=-x;
	do t[++tlen]=(x%10)^48;
	while(x/=10);
	while(tlen)putchar(t[tlen--]);
}
#define pb push_back
typedef long long ll;
typedef double lf;
typedef unsigned long long llu;
const int maxn=355,mod=1e9+7;
map<llu,vector<pair<ll,ll> > >h;
map<llu,vector<pair<ll,ll> > >::iterator it;
ll a[maxn],b[maxn],c[maxn],m,B[maxn];
int n,d[maxn];
bool cmp(const int &x,const int &y){
	return c[x]==c[y]?x<y:c[x]<c[y];
}
void work(){
	h.clear();
	n=read(),m=read<ll>();
	REP(i,1,n)a[i]=read<ll>();
	sort(a+1,a+1+n);
	REP(k,0,60){
		REP(i,1,n)
			b[i]=a[i]/(1ll<<k),c[i]=a[i]%(1ll<<k),d[i]=i;
		c[n+1]=(1ll<<k)-1,d[n+1]=n+1;
		sort(d+1,d+1+n+1,cmp);
		REP(i,1,n+1){
			ll x=c[d[i]],y=c[d[i-1]];
			int cnt=0;
			if(i!=1){
				if(x==y)continue;
				DREP(j,60,0){
					if(((x>>j)&1)^((y>>j)&1)){++cnt;break;}
					else cnt+=(x>>j)&1;
				}
			}else y=-1;
			REP(j,1,n)
				B[j]=b[j]-(c[j]<=y);
			llu hs=0;
			REP(j,2,n)hs=hs*11+(B[j]-B[j-1]);
			ll l=max(0ll,B[1]-(m-k-cnt)),r=B[1];
			if(l<=r)h[hs].pb(make_pair(l,r));
		}
	}
	int ans=0;
	static vector<pair<ll,ll> >tmp;
	for(it=h.begin();it!=h.end();++it){
		tmp=(*it).second;
		sort(tmp.begin(),tmp.end());
		ll l=0,r=-1;
		REP(i,0,tmp.size()-1){
			if(tmp[i].first>r)ans=(ans+r-l+1)%mod,l=tmp[i].first,r=tmp[i].second;
			else chkmax(r,tmp[i].second);
		}ans=(ans+r-l+1)%mod;
	}write(ans,'\n');
}
int main(){
	work();
	return 0;
}