N, M = map(int, input().split()) B = list(map(int, input().split())) val = B[0] - 1 + N - B[-1] S = 0 ans = N - 1 for k in range(M - 1, 0, -1): S += B[-1] - B[k] temp = (M + S)/(M - k) ans = min(ans, temp + val) print(ans)