func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, a[3001], b[3001], cnt = 1, sum;   int main() {     cin >> n;     for (int i = 1; i <= n; i++) cin >> a[i];     sort(a + 1, a + n + 1);     while (1) {       if (cnt == a[++sum])         cnt++;       else {         cout << cnt;         return 0;       }     }     return 0;   }   