#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+5;
typedef long long ll;
int n; ll d[N], ans, k;
int main () {
freopen("kanmoo.in", "r", stdin);
freopen("kanmoo.out", "w", stdout);
scanf("%d%lld", &n, &k);
for (int i = 1;i <= n;i++) scanf("%lld", &d[i]);
ans = k+1;
for (int i = 2;i <= n;i++) {
if (d[i]-d[i-1] > k) ans += k+1;
else ans += d[i]-d[i-1];
}
printf("%lld\n", ans);
return 0;
}