#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

int N;
ll E,T;
ll X[100010];
ll dp[100010] = {0};
int id = 0;
ll INF = 1001001001001001;
ll MIN;

int main()
{
    scanf("%d%lld%lld",&N,&E,&T);

    MIN = INF;
    for(int i = 1; i <= N; i++)
    {
        scanf("%lld",X + i);
        while(id != i && (X[i] - X[id + 1]) * 2 >= T)
        {
            MIN = min(MIN,dp[id] - X[id + 1] * 2);
            id++;
        }
        dp[i] = MIN + X[i] * 2;
        if(id != i)dp[i] = min(dp[i],dp[id] + T);
    }
    printf("%lld\n",dp[N] + E);
    return 0;
}
