Please read Band Song $1$ before attempting this problem.
Our band is back again to play another song, and yet again, Laith wrote another awful song.
This time, however, the band wants to play as many notes as possible, even if they're not continuous. Can you help them find the longest playable subsequence of the given array?
Recall that a subsequence of an array is an array that can be obtained by deleting some, possibly zero, elements from a, without changing the order of the remaining elements.
Input
The first line of the input contains a single integer $n$, $(1\leq n \leq 2\cdot10^5)$, the number of notes.
The second line contains $3$ integers, $k_1$, $k_2$, $k_3$, $(0\leq k_1<4, 0\leq k_2<5, 0\leq k_3<8) .$
The second line contains $n$ integers the values of each note, it's guaranteed that the value of each note is a positive integer less than or equal to $10^9$.
Output
Print a single integer $x$ the length of the longest subsequence they can play.
Notes
For the first test case each artists' notes will be:$\\ $