#include <bits/stdc++.h>
using namespace std;
vector<int> a, b;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, q;
  cin >> n >> q;
  a.resize(n);
  b.resize(q);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < q; i++) {
    cin >> b[i];
  }
  int l = 1, r = 1e9;
  int ans = 1e18;
  while (l <= r) {
    int m = (l + r) / 2;
    int c = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] <= m) c++;
    }
    for (int i = 0; i < q; i++) {
      if (b[i] > 0 && b[i] <= m) c++;
      if (b[i] < 0 && abs(b[i]) <= c) c--;
    }
    if (c > 0) {
      r = m - 1;
      ans = min(ans, m);
    } else {
      l = m + 1;
    }
  }
  if (ans > n) {
    cout << 0 << "\n";
  } else {
    cout << ans << "\n";
  }
}
