#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
long long int n, k;
long long int arr[N];
long long int q[N];
long long int remains(long long int num) {
  long long int count = 0;
  for (long long int i = 0; i < n; i++) {
    if (arr[i] <= num) {
      count++;
    }
  }
  for (long long int i = 0; i < k; i++) {
    if (q[i] > 0 && q[i] <= num) {
      count++;
    }
    if (q[i] < 0 && abs(q[i]) <= count) {
      count--;
    }
  }
  return count;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    for (int i = 0; i < k; i++) {
      cin >> q[i];
    }
    if (remains(1e9) == 0) {
      cout << 0 << endl;
      return 0;
    }
    long long int l = 0, r = n + 1;
    while (r - l > 1) {
      long long int h = (l + r) / 2;
      if (remains(h) > 0) {
        r = h;
      } else {
        l = h;
      }
    }
    cout << r << endl;
  }
}
