#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const long long int N = 2e5 + 4;
const long long int p = 31;
const long long int inf = 1e14;
const long long int mod = 1e9;
long long int powm(long long int a, long long int b) {
  a = a % mod;
  long long int res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return (res % mod);
}
std::vector<int> a, k;
int cnt(int first) {
  int ans = 0;
  for (auto i : a) {
    if (i <= first) {
      ans++;
    }
  }
  for (auto i : k) {
    if (i > 0 && i <= first) {
      ans++;
    }
    if (i < 0 && abs(i) <= ans) {
      ans--;
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int n, q;
    cin >> n >> q;
    a.resize(n);
    k.resize(q);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < q; i++) {
      cin >> k[i];
    }
    if (cnt(1e6) == 0) {
      cout << 0 << '\n';
    } else {
      int l = 0;
      int r = 1e6 + 1;
      while (l < r) {
        int mid = l + (r - l) / 2;
        if (cnt(mid)) {
          r = mid;
        } else {
          l = mid + 1;
        }
      }
      cout << l << '\n';
    }
  }
}
