#include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <string>
#include <cstring>
#include <numeric>
const int inf=1e9+7;
const int mod=1e9+7;
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
int main(){
	int n,x;
	int a[100];
	cin>>n>>x;
	for(int i=0;i<n;++){
		cin>>a[i];
	}
	sort(a,a+n);
	int idx=0;
	int ans=0;
	while(idx<n&&x-a[idx]>=0){
		idx++;
		ans++;
	}
	if(idx==n&&x>0){
		ans--;
	}
	cout<<ans<<endl;
	return 0;
}