#include<bits/stdc++.h>

using namespace std;

long long niz[10000];

int funkcija(int arr[], int N, int X)
{
    int mid;
 
    // Initialise starting index and
    // ending index
    int low = 0;
    int high = N;
 
    // Till low is less than high
    while (low < high) {
        mid = low + (high - low) / 2;
 
        // If X is less than or equal
        // to arr[mid], then find in
        // left subarray
        if (X <= arr[mid]) {
            high = mid;
        }
 
        // If X is greater arr[mid]
        // then find in right subarray
        else {
            low = mid + 1;
        }
    }
   
    // if X is greater than arr[n-1]
    if(low < N && arr[low] < X) {
       low++;
    }
       
    // Return the lower_bound index
    return low;
}

int main(){
	int n,a;
	cin>>n>>a; 
	for(int i=0;i<n;i++){
		cin>>niz[i];
	}
	sort(niz,niz+n);
	for(int i=0;i<n;i++){
		cout<<" "<<niz[i];
	}
	int b = funkcija(niz,n,a);
	cout<<"\n"<<b;
	return 0;
}

/*10 12
2 3 5 6 9 11 12 15 14 20*/