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=310;
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];
long long val[maxn*61][maxn];
int num;
vector<Range> c[maxn*61];
long long d[maxn];
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;
}
bool equl(long long *A,long long *B,int n){
	for(int i=1;i<=n;i++)
		if(A[i]!=B[i])
			return 0;
	return 1;
}
void Add(int n,int p,long long K){
	if(K<0) return;
	long long Mn=b[1].v-(1<=p);
	for(int i=1;i<=n;i++){
		d[i]=b[i].v-(i<=p);
		if(d[i]<0) return;
		chkmin(Mn,d[i]);
	}
	for(int i=1;i<=n;i++)
		d[i]-=Mn;
	Range st=(Range){Max(Mn-K,0),Mn};
	sort(d+1,d+n+1);
	for(int i=1;i<=num;i++){
		if(equl(d,val[i],n)){
			c[i].push_back(st);
			return;
		}
	}
	num++;
	for(int i=1;i<=n;i++)
		val[num][i]=d[i];
	c[num].push_back(st);
}
int main(){
	int n;
	long long K;
	scanf("%d%lld",&n,&K);
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);
	int nxt;
	long long l,r;
	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);
		}
	}
	long long ans=0;
	for(int i=1;i<=num;i++){
		sort(c[i].begin(),c[i].end(),cmpl);
		l=-2,r=-3;
		for(int j=0;j<(int)c[i].size();j++){
			if(c[i][j].l>r){
				ans=(ans+((r-l+1)%md))%md;
				l=c[i][j].l,r=c[i][j].r;
			}
			else chkmax(r,c[i][j].r);
		}
		ans=(ans+((r-l+1)%md))%md;
	}
	printf("%lld\n",ans);
	return 0;
}