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.


-----Input-----

The first line contains two integers n, k (1 ≤ n, k ≤ 100). The second line contains n integers a_{i} (1 ≤ a_{i} ≤ 10^9) — the numbers that Roma has. 

The numbers in the lines are separated by single spaces.


-----Output-----

In a single line print a single integer — the answer to the problem.


-----Examples-----
Input
3 4
1 2 4

Output
3

Input
3 2
447 44 77

Output
2



-----Note-----

In the first sample all numbers contain at most four lucky digits, so the answer is 3.

In the second sample number 447 doesn't fit in, as it contains more than two lucky digits. All other numbers are fine, so the answer is 2.

Difficulty: interview

Starter code:

Solutions:
n, k = list(map(int, input().split()))
print(sum(s.count('4')+s.count('7')<=k for s in input().split()))

n,k=list(map(int,input().split()))
L=list(map(str,input().split()))
ans=0
for l in L:
    if (l.count('4')+l.count('7'))<=k:
        ans+=1
print(ans)


n, k = map(int,input().split())
a = list(map(int,input().split()))

answer = 0
for i in a:
    if str(i).count('7') + str(i).count('4') <= k:
        answer += 1
print(answer)

#http://codeforces.com/problemset/problem/262/A you start

n,k = list(map(int,input().split()))

#print(n)
#print(k)

def lcount(x): #scott is this syntax right
    #print (x)
    if x > 0: #steven
        return lcount (int(x/10)) + (1 if x%10 == 4 or x%10 == 7 else 0)
    else: return 0 #steven recursion everything no loops? :P
inp = []
tot = 0
def solve(x): #main loop for n
    if x < n: #steven go ternary
        nonlocal tot
        tot += (1 if lcount(int(inp[x])) <= k else 0)
        solve (x+1) #ok why not put solve(x+1) in the if too?
inp=input().split()
solve(0)
print (tot)#steven





#rte yeah what happened
#might be my silly map nope silly int(input)
#still more bugs
#where are bugs?
#do we have to return?
#i think python lets you return whatever the hell you want still rte
#shit input() reads line not token oh LOL have to do that for the #s also wait there should be some way to read token right?
#idk prolly not? maybe
#did this ac yet nope
#btw ideone gives you compile info
#http://ideone.com/bYnMX2
#this tot thing is screwing us up
#the first 2 nums printed are n,k for debug
#can we pass pointers to ints or references or anything
#oh the problem is tot is global
#nonlocal or local? 


#http://codeforces.com/problemset/problem/262/A you start

n,k = list(map(int,input().split()))

#print(n)
#print(k)

def lcount(x): #scott is this syntax right
    #print (x)
    if x > 0: #steven
        return lcount (x//10) + (1 if x%10 == 4 or x%10 == 7 else 0)
    else: return 0 #steven recursion everything no loops? :P
inp = []
tot = 0
def solve(x): #main loop for n
    if x < n: #steven go ternary
        nonlocal tot
        tot += (1 if lcount(int(inp[x])) <= k else 0)
        solve (x+1) #ok why not put solve(x+1) in the if too?
inp=input().split()
solve(0)
print (tot)#steven





#rte yeah what happened
#might be my silly map nope silly int(input)
#still more bugs
#where are bugs?
#do we have to return?
#i think python lets you return whatever the hell you want still rte
#shit input() reads line not token oh LOL have to do that for the #s also wait there should be some way to read token right?
#idk prolly not? maybe
#did this ac yet nope
#btw ideone gives you compile info
#http://ideone.com/bYnMX2
#this tot thing is screwing us up
#the first 2 nums printed are n,k for debug
#can we pass pointers to ints or references or anything
#oh the problem is tot is global
#nonlocal or local? 
#http://ideone.com/5A6nbE the shit
#//
#AC yo how the hell you need //10
#oh lol i guess that works too


n,k=list(map(int,input().split()))

A=list(input().split())
ans=0
for item in A:
    if(item.count('4')+item.count('7')<=k):
        ans+=1
print(ans)


import sys
my_file = sys.stdin
#my_file = open("input.txt", "r")
line = my_file.readline().strip("\n").split()
n, k = int(line[0]), int(line[1])
a = my_file.readline().split()
count = 0
for i in a:
    if i.count("4") + i.count("7") <= k:
        count += 1
print(count)

3

n, k = list(map(int, input().split()))
a = input().split()

tmp = [len([1 for c in list(v) if c in ('4', '7')]) for v in a]
print(len([1 for _ in tmp if _ <= k]))


n, k = map(int, input().split())
t = list(input().split())
print(sum([(i.count('4') + i.count('7')) <= k for i in t]))

def count_lucky_numbers(l):
    counter = 0
    for i in range(len(l)):
        if l[i] == '4' or l[i] == '7':
            counter += 1
    return counter

def how_many_below(l, k):
    counter = 0
    for item in l:
        if count_lucky_numbers(item) <= k:
            counter +=1
    return counter



def main():
    first_line = input()
    first_line = first_line.split()
    
    n = int(first_line[0])
    k = int(first_line[1])
    

    l = input()
    l = l.split()

    
    
    print(how_many_below(l, k))
    
main()


n,k=list(map(int,input().split()))
a=input().split()
ans=0
for i in range(n):
    if(a[i].count('4')+a[i].count('7')<=k):
        ans+=1
print(ans)
        
        


n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if str(a[i]).count('4') + str(a[i]).count('7') <= k: cnt += 1

print(cnt)



a,b=list(map(int,input().split()))
a=list(map(str,input().split()))
c=0
for i in a:
    if i.count('4')+i.count('7')<=b:
        c+=1;
print(c)

n, k = [int(x) for x in input().split()]
numbers = input().split()

result = 0
for number in numbers:
    count = 0
    for x in number:
        if x == '4' or x == '7':
            count += 1
    if count <= k:
        result += 1

print("%d" % result)


n,k=list(map(int,input().split()))

L=input().split()
ans=0
for i in range(n):
    x=0
    for item in L[i]:
        if(item=='4' or item=='7'):
            x+=1
    if(x<=k):
        ans+=1
print(ans)


n_k = list(map(int,input().split()))
numbers = list(map(int,input().split()))

output = 0
for i in range(len(numbers)):
    i_str = str(numbers[i])
    lucky = 0
    for j in range(len(i_str)):
        if i_str[j] == '4' or i_str[j] == '7' :
            lucky += 1
    if lucky <= n_k[1] :
        output += 1
print(output)


__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = "sonhuytran@gmail.com"
__doc__ = ''
__version__ = '1.0'


def has_not_more_than_k_lucky(number: str, k: int) -> bool:
    return number.count('4') + number.count('7') <= k


def count_lucky(numbers: list, k: int) -> int:
    return sum(has_not_more_than_k_lucky(number, k) for number in numbers)


def main() -> int:
    (n, k) = map(int, input().split())
    numbers = input().split()

    print(count_lucky(numbers, k))
    return 0


def __starting_point():
    exit(main())
__starting_point()

n, k = map(int, input().split())
print(len([i for i in input().split() if i.count('4') + i.count('7') <= k]))

n, k = [int(i) for i in input().split()]

print(sum(i.count("4") + i.count("7") <= k for i in input().split()))


#July 4, 2013
def luck(n):
    total=0
    for char in n:
        if char=='4' or char=='7':
            total+=1
    return total
sa=input().split(' ')
magic=int(sa[1])
check=input().split(' ')
total1=0
for element in check:
    if luck(element)<=magic:
        total1+=1
print(total1)


def nld(n):
    val = 0
    while n > 0:
        if n % 10 in (4, 7):
            val += 1
        n //= 10
    return val

n, k = (int(x) for x in input().split())
print(sum(1 for x in (int(x) for x in input().split()) if nld(x) <= k))

import sys
import math

def fcount(val):
    count = 0
    for i in range(len(val)):
        if(val[i] == '7' or val[i] == '4'):
            count += 1
    return count
    
n, k = [int(x) for x in (sys.stdin.readline()).split()]
ai = list((sys.stdin.readline()).split())

result = 0
for c in ai:
    if(fcount(c) <= k):
        result += 1
        
print(result)

n, k = map(int, input().split());
a = list(map(str, input().split()))
ans = 0
for i in range(len(a)):
    if a[i].count('4') + a[i].count('7') <= k:
        ans += 1
print(ans)

n, k = [int(x) for x in input().split()]
l = [x for x in input().split()]
ans = 0
for x in l:
	if x.count('4') + x.count('7') <= k:
		ans += 1
print(ans)


def main():
    n, k = map(int, input().strip().split())
    print(sum(s.count('4') + s.count('7') <= k for s in input().strip().split()))


main()