#include <bits/stdc++.h>
using namespace std;
class BIT {
  int n;
  vector<int> t;
  int _sum(int p) {
    int sum = 0;
    p++;
    while (p > 0) {
      sum += t[p];
      p -= (p & (-p));
    }
    return sum;
  }

 public:
  BIT(int N) {
    n = N;
    t.assign(N + 1, 0);
  }
  int query(int l, int r) {
    int ans = _sum(r);
    if (l > 0) ans -= _sum(l - 1);
    return ans;
  }
  void update(int p, int x) {
    p++;
    while (p <= n) {
      t[p] += x;
      p += (p & (-p));
    }
  }
  int index(int v) {
    int b = 0, e = n;
    while (e - b > 1) {
      int m = (b + e) / 2;
      int sum = _sum(m - 1);
      if (sum >= v)
        e = m;
      else
        b = m;
    }
    return e;
  }
  void build(int a[]) {
    for (int i = 0; i < n; i++) update(i, a[i]);
  }
  void print() {
    for (int i = 0; i < n; i++) cout << query(i, i) << " ";
    cout << endl;
    for (int i = 0; i <= n; i++) cout << t[i] << " ";
    cout << endl;
    cout << endl;
  }
};
void solve() {
  int n, q;
  cin >> n >> q;
  BIT t(n);
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    t.update(a[i] - 1, 1);
  }
  for (int i = 0; i < q; i++) {
    int x;
    cin >> x;
    if (x > 0)
      t.update(x - 1, 1);
    else {
      x = -x;
      int p = t.index(x);
      t.update(p - 1, -1);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (t.query(i - 1, i - 1)) {
      cout << i << endl;
      return;
    }
  }
  cout << 0 << endl;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int q = 1;
  for (int i = 1; i <= q; i++) {
    solve();
  }
  return 0;
}
