#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1100;
long long read() {
  long long X = 0;
  bool F = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    F = (ch == '-');
    ch = getchar();
  }
  while (isdigit(ch)) {
    X = (X << 3) + (X << 1) + (ch ^ 48);
    ch = getchar();
  }
  return F ? -X : X;
}
long long n, q;
long long a[N], k[N];
bool check(long long now) {
  long long L = 0, R = 0;
  for (register long long i = 1; i <= n; ++i) {
    a[i] <= now ? ++L : ++R;
  }
  for (register long long i = 1; i <= q; ++i) {
    if (k[i] < 0) {
      if ((-k[i]) > L)
        --R;
      else
        --L;
    } else {
      if (k[i] > now)
        ++R;
      else
        ++L;
    }
  }
  return L > 0;
}
int main() {
  n = read();
  q = read();
  for (register long long i = 1; i <= n; ++i) a[i] = read();
  long long rem = n;
  for (register long long i = 1; i <= q; ++i) {
    k[i] = read();
    if (k[i] < 0)
      --rem;
    else
      ++rem;
  }
  if (rem <= 0) {
    printf("0\n");
    return 0;
  }
  long long l = 1, r = n;
  long long ans = n;
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (check(l))
    printf("%lld\n", l);
  else
    printf("0\n");
  return 0;
}
