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:
// This amazing code is by Eric Sunli Chen.
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
template<typename T> bool get_int(T &x)
{
	char t=getchar();
	bool neg=false;
	x=0;
	for(; (t>'9'||t<'0')&&t!='-'&&t!=EOF; t=getchar());
	if(t=='-')neg=true,t=getchar();if(t==EOF)return false;
	for(; t<='9'&&t>='0'; t=getchar())x=x*10+t-'0';
	if(neg)x=-x;return true;
}
template<typename T> void print_int(T x)
{
	if(x<0)putchar('-'),x=-x;
	short a[20]= {},sz=0;
	while(x>0)a[sz++]=x%10,x/=10;
	if(sz==0)putchar('0');
	for(int i=sz-1; i>=0; i--)putchar('0'+a[i]);
}
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define get1(a) get_int(a)
#define get2(a,b) (get1(a)&&get1(b))
#define get3(a,b,c) (get1(a)&&get2(b,c))
#define printendl(a) print_int(a),puts("")
typedef long long LL;
typedef unsigned long long uLL;
typedef pair<int,int> pii;
const int inf=0x3f3f3f3f;
const LL Linf=1ll<<61;
const double pi=acos(-1.0);

const int mod=1e9+7;

int n;
struct seq
{
	LL a[233],lb;
	bool operator ==(const seq&b)const
	{
		for(int i=2;i<=n;i++)if(a[i]-a[1]!=b.a[i]-b.a[1])return false;
		return true;
	}
	bool operator <(const seq&b)const
	{
		for(int i=2;i<=n;i++)if(a[i]-a[1]!=b.a[i]-b.a[1])return a[i]-a[1]<b.a[i]-b.a[1];
		return false;
	}
};
vector<seq>all;

#define getcode(msk,i) ((msk>>i)&1)
LL a[233],c[233],m;
LL calc(LL l,LL r,int&cnt)
{
	if(l==0){cnt=0;return 0;}
	LL ret=0;cnt=0;
	for(int i=60;i>=0;i--)
	{
		if(getcode(r,i)){ret|=1ll<<i;cnt++;}
		if(getcode(l-1,i)!=getcode(r,i))break;
	}
	return ret;
}
int main()
{
	get2(n,m);for(int i=1;i<=n;i++)get1(a[i]);sort(a+1,a+n+1);
	for(int k=0;k<=60;k++)
	{
		for(int i=1;i<=n;i++)c[i]=a[i]&(1ll<<k)-1;
		sort(c+1,c+n+1);c[0]=-1;
		for(int i=1;i<=n;i++)if(c[i]!=c[i-1])
		{
			int now;LL p=calc(c[i-1]+1,c[i],now);
			now+=k;for(int j=1;j<=n;j++)if(a[j]<p)now=-1;
			if(now!=-1&&now<=m)
			{
				seq tmp;for(int j=1;j<=n;j++)tmp.a[j]=(a[j]-p)>>k;
				tmp.lb=max(0ll,tmp.a[1]-m+now);all.pb(tmp);
			}
		}
	}
	sort(all.begin(),all.end());
	LL ans=0;
	for(int i=0,nxt=0;i<(int)all.size();i=nxt)
	{
		vector<pair<LL,LL> >v;
		for(;nxt<(int)all.size()&&all[nxt]==all[i];nxt++)v.pb(mp(all[nxt].lb,all[nxt].a[1]));
		sort(v.begin(),v.end());
		LL mx=-1;
		for(auto&x:v)
		{
			if(x.ff>mx)ans=(ans+x.ss-x.ff+1)%mod;
			else if(x.ss>mx)ans=(ans+x.ss-mx)%mod;
			mx=max(mx,x.ss);
		}
	}
	printendl(ans);
	return 0;
}