#include <bits/stdc++.h>

using namespace std;

int t,n;
int a[1000000];

int main() {
  cin >> n >> t;
  int res = 0;
  int to = -1;
  for (int i =0 ; i < n; i++) {
    int x;
    cin >> x;
    res += x + t - max(x, to);
    to = x + t;
  }
  cout << res << "\n";
}