N = int(input()) A = list(map(int, input().split(' '))) B = list(map(int, input().split(' '))) print(len([x for x, y in zip(A,B) if x <= y]))