We’re preparing your current view and syncing the latest data.
George and his friends are participating in a programming contest. Each participant has a capability indicated by the maximum difficulty level of problems they can solve. The contest has 3 rounds, each with a difficulty threshold. A participant can only attend a round if their capability is less than or equal to the round's difficulty threshold. Determine the maximum number of participants who can be assigned to one of the three rounds so that each participant participates in exactly one round and their capability satisfies the round's difficulty constraint.
The first line contains an integer n — the number of participants. The second line contains three integers r1, r2, r3 — the difficulty thresholds of rounds 1, 2, and 3. The third line contains n integers a1, a2, ..., an — the capabilities of the participants.
Print an integer — the maximum number of participants who can participate in any of the rounds meeting the conditions.
1 ≤ n ≤ 1000, 1 ≤ r1, r2, r3, ai ≤ 1000
Example 1
Input
5 1 2 3 1 4 2 3 1
Output
4
Explanation
Participants with capabilities 1, 2, 3, and 1 can participate in rounds with thresholds 1, 2, and 3 respectively. Participant with capability 4 cannot participate.