#include <iostream>

using namespace std;

int main()
{   int npogodaka,minstrela,s,pogodjenopolje,p,r=0;
    cin>>npogodaka>>minstrela;
    int polje[npogodaka*2+1];
    int npogodakaupolje[npogodaka*2+1];
    for(s=0;s<=npogodaka;s++)
       polje[s]=s;
    for(s=npogodaka+1;s<=2*npogodaka;s++)
       polje[s]=-(s-npogodaka);
    for(s=0;s<=2*npogodaka;s++)
    npogodakaupolje[s]=0;
    for(p=npogodaka;p>0;p--)
    {
        cin>>pogodjenopolje;
        for(s=0;s<=2*npogodaka;s++)
        {
            if(pogodjenopolje==polje[s]) npogodakaupolje[s]++;
        }
    }
    for(s=0;s<=2*npogodaka;s++)
    {
        if(npogodakaupolje[s]>=minstrela) r++;
    }
    cout<<r<<endl;
    for(s=0;s<=2*npogodaka;s++)
    {
        if(npogodakaupolje[s]>=minstrela) cout<<polje[s]<<" ";
    }
    return 0;
}