PROGRAMMING:WLS wants to eat
Group friends often call WLS for dinner, but WLS is very busy and often forgets. And because he doesn't have a girlfriend, and he doesn't have the ability to eat in the mall alone.
So he bought a lot of bread. Every bread has energy.
Every morning WLS will buy a bread, but he may not remember to eat it.
Need group friends to remind, group friends will only remind in the evening, every time when reminding, WLS will pick out one from all his current bread, and then eat it. But this is he thought of AA sister said to lose weight. So just pick the smallest one.
(if there is no bread, WLS has no choice but to be hungry.)
###Input format:
Two numbers n, m in the first line (m < = n)
N numbers in the next line A1, A2, A3... An. A$$_ I $$represents the energy contained in the bread WLS bought on day I.
Next, m numbers B1, B2..... BN indicate that the i-th group friend is in B$$_ Remind WLS to eat
1<=a$$_ i$$,<=100$$ \qquad$$1<=b$${_ i}$$<=n,<=1e5
###Output format:
How much energy does output WLS get
###Input example:
Here is a set of inputs. For example:
```in
5 2
5 4 3 2 1
3 4
```
###Output example:
The corresponding output is given here. For example:
```out
five
```
answer:If there is no answer, please comment
So he bought a lot of bread. Every bread has energy.
Every morning WLS will buy a bread, but he may not remember to eat it.
Need group friends to remind, group friends will only remind in the evening, every time when reminding, WLS will pick out one from all his current bread, and then eat it. But this is he thought of AA sister said to lose weight. So just pick the smallest one.
(if there is no bread, WLS has no choice but to be hungry.)
###Input format:
Two numbers n, m in the first line (m < = n)
N numbers in the next line A1, A2, A3... An. A$$_ I $$represents the energy contained in the bread WLS bought on day I.
Next, m numbers B1, B2..... BN indicate that the i-th group friend is in B$$_ Remind WLS to eat
1<=a$$_ i$$,<=100$$ \qquad$$1<=b$${_ i}$$<=n,<=1e5
###Output format:
How much energy does output WLS get
###Input example:
Here is a set of inputs. For example:
```in
5 2
5 4 3 2 1
3 4
```
###Output example:
The corresponding output is given here. For example:
```out
five
```
answer:If there is no answer, please comment