n,m=map(int,input().split()) b=[-1]+list(map(int,input().split())) def f(s): dp=[10**10]*(m+1) dp[m]=n-b[m] for i in range(m-1,0,-1): dp[i]=min(dp[i+1]+b[i+1]-b[i],(s)/m+1) return sum(dp[i] for i in range(1,m+1))/m mi=0 ma=m*n+1 while ma/mi-1>10**(-7): mid=(ma+mi)/2 if f(mid)-mid<0:ma=mid else:mi=mid s=ma dp=[10**10]*(m+1) dp[m]=n-b[m] for i in range(m-1,0,-1): dp[i]=min(dp[i+1]+b[i+1]-b[i],s/m+1) print(dp[1]+b[1]-1)