#include<cstdio>
#include<algorithm>
using namespace std;

typedef long long ll;
const int MAXN=100005;
const ll INF=1e18;

int n,m,T;
int a[MAXN];
ll d[MAXN],mine=INF;

int main(){

    scanf("%d%d%d",&n,&m,&T);
    for(int i=1;i<=n;i++) scanf("%d",&a[i]),d[i]=INF;
    for(int i=1,last=0;i<=n;i++){
        while(T<=2*(a[i]-a[last+1])){
            mine=min(mine,d[last]-2*a[last+1]);
            last++;
        }
        d[i]=d[last]+T;
        d[i]=min(d[i],mine+2*a[i]);
    }
    printf("%lld",m+d[n]);

    fclose(stdin);
    fclose(stdout);
}
