------
## 最终结论
```python
from collections import Counter

def search(lst):
    frequencies = Counter(lst)
    valid_integers = [number for number, freq in frequencies.items() if freq >= number]
    return max(valid_integers) if valid_integers else -1
```