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;
typedef long long lint;
typedef long double llf;
typedef pair<int, int> pi;
const int MAXN = 205;
const int mod = 1e9 + 7;
#define sz(v) ((int)v.size())

lint dp[62][62][2];
lint L;

lint min_ret(int pos, int rem, int mtchd){
	if(pos == 0) return 0;
	if(~dp[pos][rem][mtchd]) return dp[pos][rem][mtchd];
	lint ret = 2e18;
	for(int i=0; i<2; i++){
		if(rem < i) continue;
		if(mtchd && i == 0 && (L >> (pos - 1)) % 2 == 1) continue;
		lint val = min_ret(pos - 1, rem - i, (mtchd && (i == (L >> (pos - 1)) % 2)));
		if(i) val += (1ll << (pos - 1));
		ret = min(ret, val);
	}
	return dp[pos][rem][mtchd] = ret;
}

int min_popcnt(lint l, lint r){ // at most 12000 query
	memset(dp, -1, sizeof(dp));
	L = l;
	for(int i=0; i<60; i++){
		if(min_ret(60, i, 1) <= r) return i;
	}
	return 60;
}

int n;
lint k, a[MAXN];
vector<pair<vector<lint>, lint> > cands;

bool vect_comp(vector<lint> a, vector<lint> b){
	for(int i=1; i<sz(a); i++){
		if(b[i] - b[0] != a[i] - a[0]){
			return a[i] - a[0] < b[i] - b[0];
		}
	}
	return false;
}

int main(){
	cin >> n >> k;
	for(int i=0; i<n; i++) cin >> a[i];
	lint minVal = *min_element(a, a + n);
	for(int i=0; i<=k && i <= 60; i++){
		vector<lint> v;
		for(int j=0; j<n; j++){
			lint modv = a[j] & ((1ll << i) - 1);
			v.push_back(modv);
		}
		v.push_back((1ll << i) - 1);
		sort(v.begin(), v.end());
		v.resize(unique(v.begin(), v.end()) - v.begin());
		lint prv = -1;
		for(int j=0; j<sz(v); j++){
			if(prv + 1 > minVal) break;
			lint range = k - i - min_popcnt(prv + 1, min(minVal, v[j]));
			if(range < 0){
				prv = v[j];
				continue;
			}
			vector<lint> starter;
			for(int k=0; k<n; k++){
				lint val = (a[k] - prv - 1) >> i;
				starter.push_back(val);
				range = min(range, val);
			}
			cands.emplace_back(starter, range);
			prv = v[j];
		}
	}
	sort(cands.begin(), cands.end(), 
	[&](const pair<vector<lint>, lint> &a, const pair<vector<lint>, lint> &b){
		return vect_comp(a.first, b.first);
	});
	lint ret = 0;
	for(int i=0; i<cands.size(); ){
		int e = i;
		while(e < cands.size() && !vect_comp(cands[i].first, cands[e].first)) e++;
		map<lint, int> mp;
		for(int j=i; j<e; j++){
			lint st = cands[j].first[0];
			lint ed = st - cands[j].second;
			mp[ed]++;
			mp[st+1]--;
		}
		lint prv = -1;
		int cnt = 0;
		for(auto &i : mp){
			if(cnt > 0){
				ret += i.first - prv;
				ret %= mod;
			}
			cnt += i.second;
			prv = i.first;
		}
		i = e;
	}
	cout << ret << endl;
}