#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int n,t,a,b=0;
  cin >> n >> t;
  long long ans=0;
  for(int i=0; i<n; i++) {
    cin >> a;
    ans+=min(t,a-b);
    b=a;
  }
  cout << ans+t << endl;
}