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<algorithm>
#include<cstring>
using namespace std;
typedef long long ll;
const int mod=1e9+7;
ll read()
{
   ll x=0;bool f=1;char ch=getchar();
   while (ch<'0'||ch>'9') {if (ch=='-') f=-1;ch=getchar();}
   while (ch>='0'&&ch<='9') x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
   return x*f;
}
struct node{ll s,t,cha[202];}num[60*202];
int n,tot,top;
pair<ll,ll> q[60*202];
ll K,ans,a[202],mo[202],d[202];
bool cmp(const node &A,const node &B)
{for (int i=1;i<n;i++) if (A.cha[i]<B.cha[i]) return 1;else if (A.cha[i]>B.cha[i]) return 0;return 0;}
bool check(int x,int y)
{
	for (int i=1;i<n;i++) 
	  if (num[x].cha[i]!=num[y].cha[i]) return 0;
	return 1;
}
ll minpop(ll x,ll y)
{ 
   ll res=0;
	for (int i=60;i>=0;i--)
	  if (((x>>i)&1)==((y>>i)&1)) res+=((x>>i)&1);
	  else {res++;break;}
	return res;
}
void work()
{
	sort(q+1,q+top+1);
	ll l=q[1].first,r=q[1].second; 
	for (int i=2;i<=top;i++)
	{
		if (r<q[i].first) ans=((ll)ans+r-l+1)%mod,l=q[i].first;
		r=max(r,q[i].second);
	}
	ans=((ll)ans+r-l+1)%mod;
}
int main()
{
	n=read();K=read();
	for (int i=1;i<=n;i++) a[i]=read();
	sort(a+1,a+n+1);
	for (int i=0;i<=60;i++)//枚举除以2的次数
	{
		for (int j=1;j<=n;j++)
		  mo[j]=(a[j]&((1ll<<i)-1));//将a[i]都%2^k
		sort(mo+1,mo+n+1);
		int sc=unique(mo+1,mo+n+1)-mo-1;
		for (int j=1;j<=sc;j++)
		if (mo[j]<=a[1])//a[1]（最小的一个）要能够减得下mo[j] 
		{
			int P=(j==1)?0:minpop(mo[j],mo[j-1]);
			for (int k=1;k<=n;k++)
			  d[k]=((a[k]-mo[j])>>i);//算出除去后面i位后剩下的东西
			if (i+P<=K)
			{
			  num[++tot].s=d[1];num[tot].t=i+P;//保存首项和最少操作次数 
			  for (int k=1;k<n;k++)
			    num[tot].cha[k]=d[k+1]-d[k];//保存差分数组，用来判断是否本质不同 
		   }
		} 
	}
	sort(num+1,num+tot+1,cmp);
	for (int i=1;i<=tot;i++)
	{
		if (i!=1&&!check(i,i-1)) work(),top=0;
		q[++top]=make_pair(max(num[i].s-K+num[i].t,0ll),num[i].s);
	} 
	work(); 
	printf("%lld\n",ans);
   return 0;
}