from itertools import tee from sys import stdin old, new = tee(map(int, stdin.read().strip().split())) next(new) next(new) next(new) print(sum(o < n for o, n in zip(old, new)))