#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>

int main()
{
  // read numbers
  std::istream_iterator<int> numbers {std::cin}, eof;
  std::vector<int> arr(numbers, eof);

  // mark numbers in [1, n] range that are in the array
  size_t n = arr.size();
  std::vector<bool> m(n+1, false);
  for (int x : arr)
    if (1 <= x && x <= n)
      m[x-1] = true;

  // find the first absent number (position + 1)
  auto it = std::find(std::begin(m), std::end(m), false);
  std::cout << (std::distance(std::begin(m), it) + 1) << std::endl;
}
