#include <iostream>
#include <algorithm>
int r, n;
int points[1001];
using namespace std;
int main() {
while(~(scanf("%d%d", &r, &n))) {
if(r == -1 && n == -1) break;
for(int i=0; i<n; i++)
cin >> points[i];
sort(points, points+n);
int position = 0, ans = 0, point;
while(position < n) {
point = points[position++];
while(position < n && points[position] <= point+r) position++;
point = points[position-1];
while(position < n && points[position] <= point+r) position++;
ans ++;
}
cout << ans << endl;
}
return 0;
}