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;

#define mp make_pair
#define pb push_back
#define SZ(x) (int((x).size()))
#define ALL(x) (x).begin(),(x).end()

template<class T> inline bool chkmax(T& a,T b){ return a<b?a=b,1:0; }
template<class T> inline bool chkmin(T& a,T b){ return a>b?a=b,1:0; }

template<typename T> inline T& read(T& x){
    static char c; bool flag=0;
    while(!isdigit(c=getchar())) if(c=='-') flag=1;
    for(x=c-'0';isdigit(c=getchar());(x*=10)+=c-'0');
    if(flag) x=-x;
    return x;
}

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

const int maxn=360,mo=1e9+7;
const LL INF=0x3f3f3f3f3f3f3f3fll;

int n,ans;
LL m,a[maxn];

struct Info{
    LL b,c;
    bool operator < (const Info& rhs) const{
        return c<rhs.c;
    }
} p[maxn];

int minval(LL l,LL r){
    int ret=0;
    for(int i=59;~i;i--){
        if((l&(1ll<<i))==(r&(1ll<<i))) ret+=(l>>i)&1;
        else{ ret+=(l&((1ll<<i)-1))?1:0; break; }
    }
    return ret;
}

map<vector<LL>,vector<PLL> > Map;

void modify(int pos,LL k){
    if(k<0) return;
    LL w=INF; vector<LL> t;
    for(int i=1;i<=n;i++){
        t.pb(p[i].b-(i<=pos));
        chkmin(w,t.back());
    }
    if(w<0) return;
    for(int i=0;i<n;i++) t[i]-=w;
    sort(ALL(t));
    Map[t].pb(mp(max(w-k,0ll),w));
}

int main(){
	Map.clear();
        read(n); read(m); ans=0;
        for(int i=1;i<=n;i++) read(a[i]);

        for(int k=0;k<=60;k++){
            for(int i=1;i<=n;i++) p[i].b=a[i]>>k,p[i].c=a[i]&((1ll<<k)-1);
            sort(p+1,p+n+1);
            LL L=0,R;
            for(int i=1;i<=n;i++){
                int pos=i;
                while(pos<n&&p[i].c==p[pos+1].c) ++pos;
                R=p[i].c;
                modify(i-1,m-k-minval(L,R));
                L=R+1; i=pos;
            }
        }

        for(auto it=Map.begin();it!=Map.end();it++){
			vector<PLL> t=it->second;
			sort(ALL(t)); LL L=0,R=-1;
			for(int i=0;i<SZ(t);i++){
				if(t[i].first>R){
					(ans+=(R-L+1)%mo)%=mo;
					L=t[i].first; R=t[i].second;
				}
				else chkmax(R,t[i].second);
			}
			(ans+=(R-L+1)%mo)%=mo;
        }

	printf("%d\n",ans);

    return 0;
}