Roma (a popular Russian name that means 'Roman') loves the Little Lvov Elephant's lucky numbers.

Let us remind you that lucky numbers are positive integers whose decimal representation only contains lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Roma's got *n* positive integers. He wonders, how many of those integers have not more than *k* lucky digits? Help him, write the program that solves the problem.
The first line contains two integers *n*, *k* (1 ≤ *n*, *k* ≤ 100). The second line contains *n* integers *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the numbers that Roma has. 

The numbers in the lines are separated by single spaces.
#include <bits/stdc++.h>
using namespace std;

// ordered set
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<class T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

typedef long long ll;
typedef long double ld;
#define el cout << "\n";
#define endl "\n"
#define FAST ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define next continue
#define nxt continue
#define wc(x) (x ? "YES" : "NO")
#define tc ll T; cin >> T; while(T--)
#define Fuck_SCU break;

template<typename T,typename K>
istream& operator >>(istream& cin,pair<T,K>& p){
    cin >> p.F >> p.S;
    return cin;
}

template<typename T,typename K>
ostream& operator <<(ostream& cout,pair<T,K>& p){
    cout << p.F << ' ' << p.S << endl;
    return cout;
}

template<typename T>
istream& operator >>(istream& cin, vector<T>& v) {
    for (int i = 0; i < v.size(); i++) {
        cin >> v[i];
    }
    return cin;
}
template<typename T>
ostream& operator <<(ostream& cout, vector<T>& v) {
    for (int i = 0; i < v.size(); i++) {
        cout << v[i] << ' ';
    }
    return cout;
}

const int INF = 1e9;
const double PI = acos(-1);
const ll MOD = 998244353;

template <class T>
vector<pair<T, ll>> factors(T x) {
    vector<pair<T, ll>> v;
    int t = 0;
    while (x % 2 == 0) {
        x /= 2;
        t++;
    }
    if (t > 0) v.push_back({ 2, t });
    for (T i = 3; i * i <= x; i += 2) {
        t = 0;
        while (x % i == 0) {
            x /= i;
            t++;
        }
        if (t > 0) v.push_back({ i, t });
    }
    if (x > 1) v.push_back({ x, 1 });
    return v;
}

// Solution here
int main(){
//        freopen("input.txt", "r", stdin);
//        freopen("output.txt", "w", stdout);
    FAST

    ll n,k; cin >> n >> k;

    auto check = [&] (ll x){
        ll c = 0;
        while(x){
            ll f = x%10;
            if(f == 4 or f == 7) c++;
            x /= 10;
        }
        return c <= k;
    };
    ll res = 0;
    for(int i = 0;i < n;i++){
        ll x; cin >> x;
        res +=  check(x);
    }
    cout << res << endl;

}

/*
 Our life is short and temporary. We do not have much time in this world ->
 -> But it is how we utilize and spend the time that is given to us that ->
 -> really matters - Madara Uchiha

 Those who do not know true pain, Will never understand true peace - Nagato Uzumaki

 The longer you live....
*/
