Abraham and Filiberto have been arguing a lot during the last two months. They haven't decided which problems are going to be used in the 11th edition of the Annual Programming Contest.
As the date of the competition is coming soon, they both prepared different problem sets and now they have several problems that can be used in this contest. Both of them labeled their problems by difficulty $$$d$$$ and have arrange them into 2 different arrays, proposing the order that the problems should have during the competition.
Abraham and Filiberto are both very foolish, they proposed the order of the problems and don't want to change it in any way. That means that if a problem $$$A$$$ appears before a problem $$$B$$$ in the original array proposal, then in the final problem set, $$$A$$$ has to appear before problem $$$B$$$.
After some time of discussing how to choose the problems for the competition, they agreed with the following deal:
They want to maximize the number of problems that can be used in this competition.
As they are very tired to solve this problem, they ask for your help to compute the answer.
The first line contains two integer numbers $$$n$$$ and $$$m$$$ $$$(1 \le n,m \le 10^4)$$$ - size of Filiberto and Abraham's arrays proposal.
Second line contains $$$n$$$ integers $$$d_i$$$ $$$(1 \le d_i \le 10^9)$$$ - representing the difficulties of Filiberto's array proposal.
Next line contains $$$m$$$ integers $$$x_i$$$ $$$(1 \le x_i \le 10^9)$$$ - representing the difficulties of Abraham's array proposal.
Print one integer - maximum number of problems that can be used in the competition.
6 5 1 2 1 2 1 3 2 1 3 2 1
4
In the test case you can select 1st and 6th element from the first array and 2nd and 3rd from the second array.
The final problem set difficulties will look as: [1, 1, 3, 3].
Note that numbers marked as bold belong to Abraham's array proposal and they appear in the same order as in the original array.
| Name |
|---|


