N, E, T= map(int, raw_input().split())
nums = [int(t) for t in raw_input().split()]

time = nums[0]
i = 0

while i < len(nums):
    j = i
    while j < len(nums):
        if nums[j] - nums[i] < T:
            j += 1
        else:
            break
    length = nums[j-1] - nums[i]
    time += max(2 * length, T)
    if j < len(nums):
        time += nums[j] - nums[i]
        i = j
    else:
        time += E - nums[i] 
        i = j
        
print time
