N,L=map(int,input().split()) K=int(input()) A=list(map(int,input().split())) A=[0]+A[:]+[L] l=1 r=L from bisect import bisect_right while True: if l==r: break m=(l+r+1)//2 v0=[10**10]*(N+2) v1=[10**10]*(N+2) for i in range(1,N+2): x=A[i] pos=bisect_right(A,x-m) v0[i]=min(v0[i],v0[i-1]) v1[i]=min(v1[i],v1[i-1]) if pos==0: continue cost=i-pos v0[i]=min(v0[i],cost) v1[i]=min(v1[i],cost+v0[pos-1]) if v1[N+1]<=N-K: l=m else: r=m-1 print(l)