#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 20);
int tree[N + 5];
void upd(int pos, int x) {
  while (pos <= N) {
    tree[pos] += x;
    pos += (pos & -pos);
  }
}
int get(int k) {
  int l = 1, r = N;
  for (int i = 20; i >= 0; i--) {
    int mid = l + (1 << i) - 1;
    if (tree[mid] >= k) {
      r = mid;
    } else {
      l = mid + 1;
      k -= tree[mid];
    }
  }
  return l;
}
inline void test_case() {
  int q, n;
  cin >> n >> q;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    upd(x, 1);
  }
  while (q--) {
    int x;
    cin >> x;
    if (x > 0) {
      upd(x, 1);
    } else {
      int ind = get(-x);
      upd(ind, -1);
    }
  }
  for (int i = 1; i <= N; i++) {
    if (tree[i] >= 1) {
      cout << i << endl;
      return;
    }
  }
  cout << 0 << endl;
}
int main() {
  ios::sync_with_stdio(0);
  int T = 1;
  while (T--) {
    test_case();
  }
}
