N, M = map(int, input().split()) B = list(map(int, input().split())) cum = [0] for i in range(M): cum.append(cum[-1] + B[i]) res = N - 1 for i in range(M - 1): cnt = B[0] - 1 cnt += 1 / (1 - (i + 1) / M) cnt += N - (cum[M] - cum[i + 1]) / (M - i - 1) res = min(res, cnt) print(res)