import sys input = sys.stdin.readline N=int(input()) L=int(input()) X=[[0,L]] S=[] for i in range(N-1): x=int(input()) S.append(x) X.append([x,x+L]) for i in range(N-1): x,y=X[i] z,w=X[i+1] if y<=z or w<=x: print(-1) exit() for i in range(len(S)-2,-1,-1): S[i]+=S[i+1] ANS=0 for i in range(N-1): x,y=X[i] z,w=X[i+1] k=S[i]/(N-1-i)+L/2 if x