if __name__ == '__main__': # 入力 N = int(input()) expected_value = list(map(int, input().split(' '))) level_of_satisfaction = list(map(int, input().split(' '))) # 満足した人数 number_of_people_satisfied = 0 for i in range(N): if expected_value[i] <= level_of_satisfaction[i]: number_of_people_satisfied += 1 print(number_of_people_satisfied)