#include <bits/stdc++.h>
using namespace std;
vector<int> d, k;
int f(int mid) {
  int cnt = 0;
  for (int i : d)
    if (i <= mid) cnt++;
  for (int i : k) {
    if (i > 0 && i <= mid) cnt++;
    if (i < 0 && abs(i) <= cnt) cnt--;
  }
  return cnt;
}
int main() {
  int n, q;
  cin >> n >> q;
  d.resize(n);
  k.resize(q);
  for (int i = 0; i < n; i++) scanf("%d", &d[i]);
  for (int i = 0; i < q; i++) scanf("%d", &k[i]);
  if (f(1e9) == 0) return cout << 0 << endl, 0;
  int l = 0, r = int(1e6) + 1;
  while (r - l > 1) {
    int mid = l + (r - l) / 2;
    if (f(mid) > 0)
      r = mid;
    else
      l = mid;
  }
  cout << r << endl;
  return 0;
}
