#include <bits/stdc++.h>
using namespace std;
int n, sum;
long long a[110], k;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  sum = 2;
  for (int i = 1; i < n; i++) {
    if (a[i] - a[i - 1] > 2 * k)
      sum += 2;
    else if (a[i] - a[i - 1] == 2 * k)
      sum++;
  }
  cout << sum << endl;
  return 0;
}
