n,e,t=map(int,raw_input().split())
x=[0]+map(int,raw_input().split())
dp1=[0]*(n+1)
dp1[n]=e-x[n]
dp2=[0]*(n+1)
dp2[n]=t+e-x[n]
for i in reversed(range(n)):
    dp1[i]=x[i+1]-x[i]+dp2[i+1]
    dp2[i]=min((x[i+1]-x[i])*3+dp1[i+1],t+x[i+1]-x[i]+dp2[i+1])
print dp1[0]
