#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> v[100005];
long long mod = 1e9 + 7;
long long n, q;
vector<long long> a(1000001), k(1000001);
long long power(long long p, long long k) {
  long long a = 1;
  while (k) {
    if (k & 1) a = (a * p);
    p = (p * p);
    k >>= 1;
  }
  return a;
}
long long count(long long x) {
  long long cnt = 0;
  for (long long i = 0; i < n; i++)
    if (a[i] <= x) cnt++;
  for (long long i = 0; i < q; i++) {
    if (k[i] > 0 && k[i] <= x) cnt++;
    if (k[i] < 0 && abs(k[i]) <= cnt) cnt--;
  }
  return cnt;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  long long i, j;
  while (tc--) {
    cin >> n >> q;
    for (i = 0; i < n; i++) cin >> a[i];
    for (i = 0; i < q; i++) cin >> k[i];
    long long l = 1, h = 1e6 + 1;
    while (l < h) {
      long long mid = (l + h) / 2;
      if (count(mid) > 0)
        h = mid;
      else
        l = mid + 1;
    }
    if (h == 1e6 + 1) h = 0;
    cout << h;
    cout << "\n";
  }
}
