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
#include<cstdio>
#include<cstring>
#include<iostream>
#include<stdlib.h>
#include<ctime>
#include<string>
#include<cmath>
#include<algorithm>
#include<complex>
#include<vector>
#include<set>
#include<map>
#include<queue>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define LL long long
#define FOR(i,a,b) for (int i=a;i<=b;++i)
#define FORD(i,a,b) for (int i=a;i>=b;--i)
using namespace std;
typedef pair<LL,LL> pa;
void getint(int &v){
    char ch,fu=0;
    for(ch='*'; (ch<'0'||ch>'9')&&ch!='-'; ch=getchar());
    if(ch=='-') fu=1, ch=getchar();
    for(v=0; ch>='0'&&ch<='9'; ch=getchar()) v=v*10+ch-'0';
    if(fu) v=-v;
}
const int MO=1e9+7;
int n,ts,top,tot,now;
vector<pa> v[22222];
LL pt,L,R,K,rch,ans,tmp[222],c[222],a[222],x[222],y[222];
pa stk[222];
struct node{
	LL w[200];
	node(){memset(w,0,sizeof(w));}
	bool operator < (const node & A) const{
		FOR(i,0,199)
			if (w[i]<A.w[i]) return 1;
			else if (w[i]>A.w[i]) return 0;
		return 0;
	}
};
LL bcm(LL x,LL y){
	LL ans=0;
	FOR(i,0,60)
		if ((y>>i)&1){
			if (y-(1ll<<i)>=x) y-=1ll<<i;
			else ++ans;
		}
	return ans;
}
map<node,int> M;
int main(){
	cin>>n>>K;
	FOR(i,1,n) cin>>a[i];
	sort(a+1,a+n+1);
	tmp[0]=-1;
	FOR(j,0,60){
		FOR(i,1,n){
			x[i]=(a[i]>>j);
			y[i]=(a[i])%(1ll<<j);
			tmp[i]=y[i];
		}
		sort(tmp+1,tmp+n+1);
		ts=unique(tmp+1,tmp+n+1)-tmp-1;
		if (tmp[ts]!=(1ll<<j)-1) tmp[++ts]=(1ll<<j)-1;
		FOR(k,1,ts){
			FOR(i,1,n)
				if (tmp[k]<=y[i]) c[i]=x[i];
				else c[i]=x[i]-1;
			pt=bcm(tmp[k-1]+1,tmp[k])+j;
			if (pt>K) continue;
			node P;
			FOR(i,2,n) P.w[i-1]=c[i]-c[i-1];
			if (M.find(P)==M.end()) M[P]=++tot;
			now=M[P];
		//	tmp[k-1]+1~tmp[k]
			L=max(0ll,c[1]-(K-pt)),R=c[1];
			v[now].pb(mp(L,R));
		}
	}
	FOR(i,1,tot){
		top=0;
		for (int j=0;j<v[i].size();++j) stk[++top]=v[i][j];
		sort(stk+1,stk+top+1);
		rch=-1;
		FOR(j,1,top){
			if (stk[j].se<=rch) continue;
			if (stk[j].fi>rch) (ans+=stk[j].se-stk[j].fi+1)%=MO,rch=stk[j].se;
			else (ans+=stk[j].se-rch)%=MO,rch=stk[j].se;
		}
	}
	cout<<(ans+MO)%MO<<endl;
	return 0;
}
