#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <bitset>
using namespace std;

#define N 100010
typedef long long ll;

const ll INF=1e18;

int n,E,T;
int dis[N];
ll Dp[N];


inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch<='9'&&ch>='0'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}

int main()
{
    n=read();E=read();T=read();
    for(int i=1;i<=n;i++)
        dis[i]=read();
    Dp[0]=0;
    int pos=0;ll Min=INF;
    for(int i=1;i<=n;i++)
    {
        Dp[i]=Dp[i-1]+T;
        while(pos+1<=i&&2*(dis[i]-dis[pos+1])>T)
        {
            Min=min(Min,Dp[pos]-2*dis[pos+1]);
            pos++;
        }
        Dp[i]=min(min(Dp[i],Dp[pos]+T),Min+2*dis[i]);
    }
    cout<<Dp[n]+E<<endl;
    return 0;
}
