#include<bits/stdc++.h>
#define T 100005
#define N 105
using namespace std;
int n,m,t,a[N],A[T],ans;

int main(){
  cin>>n>>m>>t;
  for(int i=0;i<n;i++){
    cin>>a[i];
    A[a[i]-m]++;
    A[a[i]+m+1]--;
  }
  for(int i=1;i<=t;i++)
    A[i]+=A[i-1];
  int f=0;
  for(int i=0;i<=t;i++){
    if(!A[i])ans++;
    else if(i&&f&&!A[i-1])ans++;
    if(A[i])f=1;
  }
  cout<<ans<<endl;
  return 0;
}