#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef    pair<int,int> pii;
typedef    pair<int,pii> ppi;
typedef    pair<pii,int> pip;
typedef    long long int ll;
typedef    unsigned long long int ull;
typedef    pair<ll,ll> pll;
typedef    vector<int> VI;
typedef    vector<pii> Vii;
typedef    vector<VI> VVI;// 2D
//typedef    priority_queue<int> PQ;// MaxHeap
typedef    priority_queue<int,VI,greater<int> > PQ;// MinHeap
//int Dx[] ={-1,0, 0,1};
//int Dy[] ={ 0,1,-1,0};
//int Dx8[]={-1,-1,-1,0,1,1, 1, 0};
//int Dy8[]={-1, 0, 1,1,1,0,-1,-1};
//int Kx[] ={2,1,-1,-2,-2,-1, 1, 2};
//int Ky[] ={1,2, 2, 1,-1,-2,-2,-1};

// code starts from here
#define pi acos(-1.0)
const int MAX=1e6+10,MOD=1e9+7;
int BIT[MAX],N,K;
void update(int i,int x){
    for(;i<=N;i+=i&-i)BIT[i]+=x;
}
int query(int i){
    int res=0;
    for(;i>=1;i-=i&-i)res+=BIT[i];
    return res;
}
void solve(){
    cin >> N >> K;

    vector<int> V;
    for(int i=0;i<N;i++){
        int x;
        cin >> x;
        update(x,1);
    }
    for(int i=0;i<K;i++){
        int x; cin >> x;
        if(x>0)update(x,1);
        else {
            x = abs(x);
            int ret = query(x);
            //cout<<"smaller or equal than "<<x<<" "<<ret<<endl;
            int idx = ret + x -1;
            //cout<<"bad index "<<bad<<endl;
            bad[ret]=1;
            update(x,1);
        }
    }
    sort(V.begin(),V.end());
    N = V.size();
    for(int i=0;i<N;i++){
        if(bad[i]==0){
            cout<<V[i]<<endl;
            return;
        }
    }
    cout<<0<<endl;
}
int main (){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int t=1;
    while(t--)solve();
    return 0;
}
