#include <bits/stdc++.h>
using namespace std;
vector<int> a, k;
int count(int x) {
  int cnt = 0;
  for (auto y : a)
    if (y <= x) cnt++;
  for (auto y : k) {
    if (y > 0 && y <= x) cnt++;
    if (y < 0 && abs(y) <= cnt) cnt--;
  }
  return cnt;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n = 0, q = 0;
  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 (!count(1e9 + 42)) {
    cout << 0;
    return 0;
  }
  int l = 0, r = 1e6 + 1;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (count(mid) > 0)
      r = mid;
    else
      l = mid;
  }
  cout << r;
  return 0;
}
