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 <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#pragma warning(disable:4996)
#pragma comment(linker, "/STACK:336777216")
using namespace std;

#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define ldb ldouble

typedef tuple<int, int, int> t3;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <db, db> pdd;

int IT_MAX = 1 << 19;
int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const ll LL_INF = 0x3f3f3f3f3f3f3f3f;
const db PI = acos(-1);
const db ERR = 1e-10;
#define szz(x) (int)(x).size()
#define rep(i, n) for(int i=0;i<n;i++)
#define Se second
#define Fi first

const int MX = 200005;
const int MM = 1000000007;

map<vector<ll>, vector<pll>> X;
int N;
ll K;

bool update(vector<pll> &L, pll c){
	for(pll e : L) if( e.first <= c.first && c.second <= e.second ) return false;
	vector<pll> X;
	L.push_back(c);
	sort(L.begin(), L.end());
	for(pll e : L){
		ll lst = 0;
		while(X.size() && e.first <= X.back().second+1 ){
			e.second = max(e.second, X.back().second);
			e.first = X.back().first;
			X.pop_back();
		}
		X.push_back(e);
	}
	swap(X, L);
	return true;
}

void dfs(vector<ll> &P, ll K){
	vector<ll> Q;
	for(int i = 0; i+1 < P.size(); i++) Q.push_back(P[i+1] - P[i]);

	ll mn = P[0];
	for(ll c : P) mn = min(mn, c);
	if( !update(X[Q], pll(max(0ll, mn-K),mn)) ) return;

	if( K < 1) return;
	vector<ll> R;
	for(ll c : P) R.push_back(c/2);
	dfs(R, K-1);
	
	if( K < 2) return;
	for(int i = 0; i < N; i++){
		if( P[i] <= 0 ) return;
		R[i] = (P[i]-1)/2;
	}
	dfs(R, K-2);
}

int main()
{
	scanf("%d%lld", &N, &K);
	vector<ll> P;
	for(int i = 1; i <= N; i++){
		ll a;
		scanf("%lld", &a);
		P.push_back(a);
	}
	dfs(P, K);
	ll ans = 0;
	for(auto e : X){
		for(pll c : e.second){
			ans = (ans + c.second - c.first + 1) % MM;
		}
	}
	printf("%lld\n", ans);
}