n,m = map(int,input().split()) *b, = list(map(int,input().split())) dp = [0.0]*m acc = [0.0]*m dp[-1] = acc[-1] = n-b[-1] for i in range(m-1)[::-1]: dp[i] = min(n-b[i], m/(m-1-i) + acc[i+1]/(m-1-i)) acc[i] = acc[i+1] + dp[i] print(dp[0]+b[0]-1)