Jaiden's Maidens
Jaiden has decided he would like to treat himself by buying a boat. Infact, he has decided that he'll buy several of them.
A common tradition for a boat's maiden voyage is to smash a bottle of champange or wine over the bow, which Jaiden has decided to participate in. However, Jaiden needs to be careful as if the bottle fails to break it is considered a bad omen.
Jaiden has several bottles which he will have to smash against the boats. Each boat has a hardness value . Each bottle has a brittleness value
. The boats are in a fixed order, but bottles that are thrown at each boat are selected by Jaiden. He must only throw a single bottle at a given boat, and cannot opt to skip a boat. If it is not possible to successfully break a bottle on the boat Jaiden is currently at, he will stop and not further attempts will be made.
On a given throw of a bottle with brittleness value , on a boat with hardness
, the bottle will break if
.
What is the maximum number of bottles Jaiden can successfully break?
Input
The first line consists of a single integer
, the number of boats and bottles of champange.
The next line consists of space separated integers
, the hardness value of the
boat.
The next line consists of space separated integers
, the brittleness value of the
bottle of champange.
Output
Output a single integer, the maximum number bottles Jaiden can successfully break.
Examples
Input 1
5
7 2 9 3 3
2 4 6 8 10
Output 1
5
Input 2
3
1 2 100
2 1 1
Output 2
2
Comments