Maxim wants to buy some games at the local game shop. There are $n$ games in the shop, the $i$-th game costs $c_i$.

Maxim has a wallet which can be represented as an array of integers. His wallet contains $m$ bills, the $j$-th bill has value $a_j$.

Games in the shop are ordered from left to right, Maxim tries to buy every game in that order.

When Maxim stands at the position $i$ in the shop, he takes the first bill from his wallet (if his wallet is empty then he proceeds to the next position immediately) and tries to buy the $i$-th game using this bill. After Maxim tried to buy the $n$-th game, he leaves the shop.

Maxim buys the $i$-th game if and only if the value of the first bill (which he takes) from his wallet is greater or equal to the cost of the $i$-th game. If he successfully buys the $i$-th game, the first bill from his wallet disappears and the next bill becomes first. Otherwise Maxim leaves the first bill in his wallet (this bill still remains the first one) and proceeds to the next game.

For example, for array $c = [2, 4, 5, 2, 4]$ and array $a = [5, 3, 4, 6]$ the following process takes place: Maxim buys the first game using the first bill (its value is $5$), the bill disappears, after that the second bill (with value $3$) becomes the first one in Maxim's wallet, then Maxim doesn't buy the second game because $c_2 &gt; a_2$, the same with the third game, then he buys the fourth game using the bill of value $a_2$ (the third bill becomes the first one in Maxim's wallet) and buys the fifth game using the bill of value $a_3$.

Your task is to get the number of games Maxim will buy.
The first line of the input contains two integers $n$ and $m$ ($1 \le n, m \le 1000$) — the number of games and the number of bills in Maxim's wallet.

The second line of the input contains $n$ integers $c_1, c_2, \dots, c_n$ ($1 \le c_i \le 1000$), where $c_i$ is the cost of the $i$-th game.

The third line of the input contains $m$ integers $a_1, a_2, \dots, a_m$ ($1 \le a_j \le 1000$), where $a_j$ is the value of the $j$-th bill from the Maxim's wallet.
5 4
2 4 5 2 4
5 3 4 6
3
5 2
20 40 50 20 40
19 20
0
6 4
4 8 15 16 23 42
1000 1000 1000 1000
4
5 1
1 1 1 1 1
5
1
5 1
10 1 1 1 1
1000
1
5 1
100 100 100 100 100
100
1
2 1
2 1
1
1
2 3
3 1
2 4 2
1
1 5
4
1 4 3 3 2
0
5 3
4 2 3 1 1
2 1 3
3
3 5
5 2 5
1 4 1 4 2
0
7 3
9 7 10 2 1 1 1
8 9 6
3
5 3
2 5 3 3 2
2 5 3
3
##########################################################################
#     Author : nesco   
#     Created: Tue Dec 28 2021 21:32:01
#     File   : A. Game Shopping
##########################################################################
import sys,math,cmath,time,collections
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################
def solve():
    n, m = invr()
    c = inlt()
    a = inlt()

    cnt = 0

    for i in range(m):
        bill = a[i]

        if len(c) > 0:
            while(bill < c[0]):
                del c[0]
                if len(c) == 0:
                    break

            if len(c) > 0:
                if bill >= c[0]:
                    cnt = cnt + 1
                    del c[0]
        else:
            break

    print(cnt)

################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    t = 1
    for tt in range(1,t + 1):
        solve()
 
#---------------------- USER DEFINED INPUT FUNCTIONS --------------------#
def inp():   # input integer
    return(int(input()))
def inlt():  # input list of integers
    return(list(map(int,input().split())))
def inls():  # input list of strings
    return(list(map(str,input().split())))
def insr():  # input string
    return(input().strip())
def invr():  # input array
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
# are a and b coprime?
def is_coprime(x, y):
    return gcd(x, y) == 1

# gcd of two positive integers
def gcd(p,q):
    while q != 0:
        p, q = q, p%q
    return p

# set to list converter
def convert(set):
    return list(set)

# outputs unique values from list
def unique(list):
    list_set = set(list)
    unique_list = convert(list_set)
    return unique_list

# sorting string
def sort_string(string):
    r = sorted(string)
    return "".join(r)

# reverse string
def reverse_string(string):
    return string[::-1]

# Convert string to list character-wise
def convert_to_list(string):
    lis=[]
    lis[:0]=string
    return lis

# list of all prime numbers up to n
def seive(n):
    a = []
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p ** 2,n + 1, p): 
                prime[i] = False
        p = p + 1
    for p in range(2,n + 1): 
        if prime[p]: 
            a.append(p)
    return(a)

def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)
 
# counts number of elements 
def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

# counts number of letters in string
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
    return(q)
 
# returns factorial of n
def factorial(n,m = 1000000007):
    q = 1
    for i in range(n):
        q = (q * (i + 1)) % m
    return(q)

# returns all (possible) factors of n
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))

# returns prime factors of n
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

# transpose matrix or vector (list)
def transpose(a):
    n,m = len(a),len(a[0])
    b = [[0] * n for i in range(m)]
    for i in range(m): 
        for j in range(n): 
            b[i][j] = a[j][i]
    return(b)

# returns boolean if x is power of two
def power_two(x):
    return (x and (not(x & (x - 1))))

# returns ceil of division
def ceil(a, b):
    return -(-a // b)
#-----------------------------------------------------------------------#
    
main()