from collections import defaultdict from itertools import permutations N = int(input()) A = tuple(map(int, input().split())) B = tuple(map(int, input().split())) score = defaultdict(int) for a in permutations(A): n = sum([i-j for i,j in zip(a, B) if i > j]) score[n] += 1 ans = sorted(score.items(), reverse=1) print(ans[0][1])