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 "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "functional"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-8;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

class XorShift {
	unsigned int x, y, z, w, t;
public:
	XorShift() {
		x = 133553533;
		y = 314867339;
		z = 664298413;
		w = 999999937;
		t = 0;
	}
	unsigned int rand() {
		t = x ^ (x << 11);
		x = y;
		y = z;
		z = w;
		w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
		return w & 0x7fffffff;
	}
};

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	XorShift xs;
	cin >> N >> K;
	//for (int loop = 0; loop < 100; loop++) {
		vector<long long int>v(N);
		for (auto &i : v)cin >> i;
		//for (int i = 0; i < N; i++)v[i] = xs.rand() & 31;
		sort(v.begin(), v.end());
		//for (auto i : v)cout << i << " ";
		//cout << endl;
		//set<vector<long long int>>vs;
		//for (int i = 0; i < pow(3, K); i++) {
		//	auto w = v;
		//	int box = i;
		//	for (int j = 0; j < K; j++) {
		//		if (box % 3 == 1) {
		//			for (auto &k : w)k >>= 1;
		//		}
		//		else if (box % 3 == 2) {
		//			if (w.front())for (auto &k : w)k--;
		//		}
		//		box /= 3;
		//	}
		//	vs.insert(w);
		//}
		//cout << vs.size() << " ";
		map<vector<long long int>, set<pair<long long int, long long int>>>mp;
		for (int i = 0; i <= 60; i++) {
			//cout << "loop " << i << endl;
			vector<long long int>box;
			long long int st = 0;
			for (int j = 0; j < N; j++) {
				box.push_back(v[j] & ((1LL << i) - 1));
			}
			//box.push_back(0);
			sort(box.begin(), box.end());
			box.push_back((1LL << i) - 1);
			for (auto j : box) {
				//cout << "loop " << i << " " << j << endl;
				if (v.front() < st)break;
				if (st > j)continue;
				vector<long long int>w;
				for (auto k : v) {
					if ((k&((1LL << i) - 1)) >= j) {
						w.push_back(k >> i);
					}
					else {
						w.push_back((k >> i) - 1);
					}
				}
				vector<long long int>dif;
				for (auto k : w)dif.push_back(k - w.front());
				long long int ed = j;
				long long int bit = 0;
				for (int k = 61; k >= 0; k--) {
					if (((st >> k) & 1)&((ed >> k) & 1))bit |= (1LL << k);
					else if (((st >> k) & 1) | ((ed >> k) & 1)) {
						if(st!=bit)bit |= (1LL << k);
						break;
					}
				}
				int used = 0;
				while (bit) {
					used += bit & 1;
					bit >>= 1;
				}
				if (!st)used = 0;
				st = j + 1;
				//cout << "used " << i + used << endl;
				if (i + used > K)continue;
				//cout << "loop " << i << " ";
				//cout << "bit " << j << endl;
				//cout << "diff ";
				//cout << w.front() << endl;
				//for (auto k : dif)cout << k << endl;
				R = w.front();
				L = max(R - (K - i - used), 0LL);
				if (mp[dif].empty()) {
					mp[dif].insert({ L,R });
				}
				else {
					auto it = mp[dif].lower_bound({ L,MOD*MOD });
					while (it != mp[dif].end() && it->first <= R + 1) {
						auto nx = next(it);
						R = max(R, it->second);
						mp[dif].erase(it);
						it = nx;
					}
					it = mp[dif].lower_bound({ L,MOD*MOD });
					if (it != mp[dif].begin()) {
						it = prev(it);
						while (it->second >= L - 1) {
							if (it == mp[dif].begin()) {
								L = min(L, it->first);
								R = max(R, it->second);
								mp[dif].erase(it);
								break;
							}
							auto pv = prev(it);
							L = min(L, it->first);
							R = max(R, it->second);
							mp[dif].erase(it);
							it = pv;
						}
					}
					mp[dif].insert({ L,R });
				}
				st = j + 1;
			}
		}
		long long int ans = 0;
		for (auto i : mp) {
			//cout << "vector\n";
			//for (auto j : i.first)cout << j << " ";
			//cout << endl;
			for (auto j : i.second) {
				//cout << j.first << " " << j.second << endl;
				ans += j.second - j.first + 1;
				ans %= MOD;
			}
		}
		cout << ans << endl;
	//}
	return 0;
}