a=int(input()) b=input() c=list(map(int,input().split())) c.sort() count=0 while a-c[count]>=0 and count