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)+1) return sum(dp[i] for i in range(1,m+1))/m mi=0 ma=n+1 while ma-mi>10**(-5): 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+1) print(dp[1]+b[1]-1)