n=int(input()) al=list(map(int,input().split())) bl=list(map(int,input().split())) ans=0 for i in range(n): if al[i]<=bl[i]:ans+=1 print(ans)