#include using namespace std; int main() { int n, k; cin >> n >> k; vector a(n + 1); for (int i = 1; i <= n; ++i) { cin >> a[i]; } sort(a.begin() + 1, a.end()); set s; for (int i = 1; i <= k; ++i) { s.insert(i); } cout << s.size(); return 0; }