input() print(sum(a <= b for a, b in zip(map(int, input().split()), map(int, input().split()))))