#include<bits/stdc++.h>
using namespace std;
long long n,E,T,t,a[100005],f[100005],M=1LL<<60;int main(){scanf("%lld%lld%lld",&n,&E,&T);for(int i=1;i<=n;i++)scanf("%lld",&a[i]);for(int i=1;i<=n;i++){for (;T<=2*(a[i]-a[t+1]);t++)M=min(M,f[t]-2*a[t+1]);f[i]=min(f[t]+T,M+2*a[i]);}printf("%lld",E+f[n]);}