n,m = map(int,input().split()) B = list(map(int,input().split())) dp = [10**20]*m dp[-1] = n-B[-1] cum = dp[-1] for i in range(m-1)[::-1]: dp[i] = B[i+1]-B[i]+dp[i+1] cal = m/(m-i-1)+cum/(m-i-1) if cal < dp[i]: dp[i] = cal cum += dp[i] ans = dp[0]+B[0]-1 print(ans)