#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
const int N = 1000090, M = 1000000007;
int B[N];
void up(int i, int v) {
  for (; i < N; i += (i & (-i))) B[i] += v;
}
int sm(int i) {
  int s = 0;
  for (; i > 0; i -= (i & (-i))) s += B[i];
  return s;
}
int main() {
  int q, x, n;
  scanf("%d %d", &n, &q);
  for (int i = 0; i < n; ++i) scanf("%d", &x), up(x, 1);
  for (int Q = 0; Q < q; ++Q) {
    scanf("%d", &x);
    if (x > 0)
      up(x, 1), n++;
    else {
      int b = 0, e = N;
      x = -1 * x;
      while (b < e) {
        int bw = (b + e) / 2;
        int z = sm(bw);
        if (z >= x)
          e = bw;
        else
          b = bw + 1;
      }
      up(b, -1);
      n--;
    }
  }
  int ans = sm(N);
  if (!ans)
    printf("0");
  else {
    for (int i = 1; i < N; ++i)
      if (sm(i) > 0) return cout << i, 0;
  }
}
