#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define maxn 100005
typedef long long LL;
int n,x[maxn],T,E;
LL f[maxn],ans;   

int main()
{
    scanf("%d%d%d",&n,&E,&T);
    for (int i=1;i<=n;i++) scanf("%d",x+i);
    for (int i=1;i<=n;i++) f[i]=1e16;
/*    for (int i=1;i<=n;i++) 
        for (int j=1;j<=i;j++)
            f[i]=min(f[i],f[j-1]+max(T,(x[i]-x[j])*2));*/
    int p=1;LL t=1e16;;
    for (int i=1;i<=n;i++)
    {
        while ((x[i]-x[p])*2>T&&p<=i) 
        {
            t=min(t,f[p-1]-2*x[p]);
            p++;   
        }
        f[i]=min(f[i],min(f[p-1]+T,t+2*x[i]));
    }
    ans=E+f[n];
    printf("%lld\n",ans);
    return 0;
}