n = int(input()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] ans = 0 for i in range(n): if a[i] <= b[i]: ans += 1 print(ans)