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 std :: map;
using std :: pair;
using std :: vector;

#define exec_time() (1.0*clock()/CLOCKS_PER_SEC)
#define fst first
#define snd second

typedef long long LL;
typedef pair<LL, LL> Pll;

template <typename T> inline bool maximum(T &a, T b) { return a < b? a = b, 1 : 0; }
template <typename T> inline bool minimum(T &a, T b) { return a > b? a = b, 1 : 0; }
template <typename T> inline
T read(T &x, T f = 0)
{
	char c = getchar(); x = 0;
	for(; !isdigit(c); c = getchar())
		f |= c == '-';
	for(;  isdigit(c); c = getchar())
		x = x*10 + c-'0';
	return x = f? -x : x;
}

const int N = 3.5e2 + 10;
const int mod = 1e9 + 7;
const LL inf = 1LL << 61;

int n; LL K, a[N];
Pll tmp[N];
map<vector<LL>, vector<Pll> > id;
map<vector<LL>, vector<Pll> > ::iterator it;

void add(int &a, int b)
{
	a += b;
	if(a >= mod) a -= mod;
}

int calc(LL l, LL r)
{
	int res = 0;
	for(int i = 59; i >= 0; --i){
		LL idl = l & (1LL << i);
		LL idr = r & (1LL << i);
		if(idl == idr) res += (l >> i) & 1;
		else
		{
			res += (bool)(l & ((1LL<<i)-1));
			break;
		}
	}
	return res;
}

void Insert(int pos, LL rest)
{
	if(rest < 0) return ;

	LL Mn = inf;
	vector<LL> V;

	for(int i = 1; i <= n; ++i){
		V.push_back(tmp[i].snd - (i <= pos));
		minimum(Mn, V[i-1]);
	}
	if(Mn < 0) return ;

	for(int i = 0; i < n; ++i) V[i] -= Mn;
	std::sort(V.begin(), V.end());
	id[V].push_back(Pll(std::max(0LL, Mn-rest), Mn));

	return ;
}

void Init()
{
	id.clear();

	read(n), read(K);
	for(int i = 1; i <= n; ++i) read(a[i]);
	std::sort(a + 1, a + n + 1);

	for(int k = 0; k <= 60; ++k){
		for(int i = 1; i <= n; ++i){
			tmp[i].fst = a[i] & ((1LL << k) - 1);
			tmp[i].snd = a[i] >> k;
		}

		std::sort(tmp + 1, tmp + n + 1);
		LL l = 0, r = 0;
		int lst = 0;

		for(int cur = 1; cur <= n; cur = lst + 1){
			lst = cur;
			while(lst < n && tmp[lst+1].fst == tmp[cur].fst) ++lst;
			r = tmp[cur].fst;
			Insert(cur-1, K - k - calc(l, r));
			l = r + 1;
		}
	}

	return ;
}

void Work()
{
	int Ans = 0;
	for(it = id.begin(); it != id.end(); ++it){
		vector<Pll> o = it -> snd;
		LL l = 0, r = -1;

		std::sort(o.begin(), o.end());
		for(int i = 0; i < (int)o.size(); ++i){
			if(o[i].fst > r){
				add(Ans, (r - l + 1) % mod);
				l = o[i].fst, r = o[i].snd;
			}
			else maximum(r, o[i].snd);
		}
		add(Ans, (r - l + 1) % mod);
	}
	printf("%d\n", Ans);
}

int main()
{

//	int T; read(T);
//	while(T--){
		Init();
		Work();
//	}

	return 0;
}
//XXX