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 ll;
typedef pair<ll,ll> pll;
ll n, k, MOD = 1e9+7;
ll arr[210];
int chk[210];

vector<pair<vector<ll>,pll>> lis;

int main() {
    int i, j;

    scanf("%lld%lld",&n,&k);
    for (i=0;i<n;i++) scanf("%lld",&arr[i]);
    sort(arr,arr+n);
    for (i=0;i<62&&i<=k;i++) {
        ll uni = 1LL<<i;
        vector<pll> tmp;
        for (j=0;j<n;j++) tmp.push_back(pll(arr[j]%uni,j));
        sort(tmp.begin(),tmp.end());

        vector<ll> vec;
        for (int l=0;l<n;l++) {
            vec.push_back(arr[l]/uni-(arr[0]/uni));
        }
        lis.push_back(pair<vector<ll>,pll>(vec,pll(max(arr[0]/uni-(k-i),0LL),arr[0]/uni)));

        for (j=0;j<n;j++) {
            if ((j!=n-1&&tmp[j+1].first==tmp[j].first)||tmp[j].first==uni-1) continue;
            if (arr[tmp[j].second]<uni) break;
            int l, c = 1; ll val = ((j==n-1)?uni-1:tmp[j+1].first);
            for (l=i-1;l>=0;l--) {
                if ((tmp[j].first>>l)!=(val>>l)) break;
                c += (int)(tmp[j].first>>l&1);
            }
            if (k-c-i<0) continue;
            ll cnt = k-c-i;
            for (l=0;l<=j;l++) chk[tmp[l].second] = 1;
            vector<ll> vec;
            for (l=0;l<n;l++) {
                vec.push_back(arr[l]/uni-chk[l]-(arr[0]/uni-chk[0]));
            }
            lis.push_back(pair<vector<ll>,pll>(vec,pll(max(arr[0]/uni-chk[0]-cnt,0LL),arr[0]/uni-chk[0])));
            for (l=0;l<=j;l++) chk[tmp[l].second] = 0;
        }
    }
    sort(lis.begin(),lis.end());
    j = 0;
    ll ans = 0;
    for (i=0;i<lis.size();i++) {
        if (i+1!=lis.size()&&lis[i+1].first==lis[i].first) continue;
        ll s = -1, e = -1;
        for (;j<=i;j++) {
            if (s<0) s=lis[j].second.first,e=lis[j].second.second;
            else e=max(e,lis[j].second.second);
            if (j==i||lis[j+1].second.first>e) {ans += e-s+1;s=-1,e=-1;ans%=MOD;}
        }
    }
    printf("%lld\n",ans);

    return 0;
}