Expedition
The Mesclenites are gearing up for an expedition to the world's edge. They have a ship composed of N×M interconnected rafts. Each raft has a specific load capacity, and each Mesclenite has a distinct weight. Only one Mesclenite can occupy a raft at a time. If a Mesclenite's weight exceeds the raft's load capacity, they will unfortunately sink.
The expedition leader needs to arrange the seating on the rafts. Your task is to help determine the maximum number of Mesclenites that can safely join the expedition.
Input
The first line provides the integers N and M (1 ≤ N, M ≤ 40). Each of the next N lines contains M integers, indicating the load capacity of each corresponding raft. The (N+2)-th line contains the integer K (1 ≤ K ≤ 2000), representing the number of Mesclenites. The (N+3)-th line lists K integers, where the i-th integer is the weight of the i-th Mesclenite. All weights and load capacities are natural numbers not exceeding 10^9.
Output
Output a single integer, which is the maximum number of Mesclenites that can participate in the expedition.