N = int(input()) counter = 0 for a, b in zip(list(map(int,input().split())), list(map(int,input().split()))): if a <= b : counter += 1 print(counter)