#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int tree[maxn];
int xx[maxn];
int n, q;
inline int lowbit(int &xx) { return xx & -xx; }
void utr(int ii, int xx) {
  while (ii < maxn) {
    tree[ii] += xx;
    ii += lowbit(ii);
  }
}
int rtr(int ii) {
  int res = 0;
  while (ii) {
    res += tree[ii];
    ii -= lowbit(ii);
  }
  return res;
}
bool chk(int mid, int K) {
  if (rtr(mid) >= K)
    return true;
  else
    return false;
}
int find2(int L, int R, int K) {
  int res = 0;
  while (L <= R) {
    int mid = (L + R) >> 1;
    if (chk(mid, K)) {
      res = mid;
      R = mid - 1;
    } else
      L = mid + 1;
  }
  return res;
}
void deal1() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++) {
    int temp;
    scanf("%d", &temp);
    utr(temp, 1);
  }
  for (int i = 1; i <= q; i++) {
    int k;
    scanf("%d", &k);
    if (k > 0) {
      utr(k, 1);
    } else {
      int ii = find2(1, n, -k);
      utr(ii, -1);
    }
  }
  int ii = find2(1, n, 1);
  printf("%d\n", ii);
}
int aa[maxn];
int bb[maxn];
bool chk2(int mid, int n, int q) {
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (aa[i] <= mid) cnt++;
  for (int i = 1; i <= q; i++) {
    if (bb[i] > 0 && bb[i] <= mid)
      cnt++;
    else if (bb[i] < 0 && -bb[i] <= cnt)
      cnt--;
  }
  return cnt;
}
void deal2() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++) scanf("%d", aa + i);
  for (int i = 1; i <= q; i++) scanf("%d", bb + i);
  int L = 1, R = n;
  int res = 0;
  while (L <= R) {
    int mid = (L + R) >> 1;
    if (chk2(mid, n, q)) {
      res = mid;
      R = mid - 1;
    } else
      L = mid + 1;
  }
  printf("%d\n", res);
}
int main() { deal2(); }
