#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); using ld = long double; ll N,M; cin >> N >> M; vector B(M); rep(i,M) cin >> B[i]; vector B_sum(M + 1, 0); rep(i,M) B_sum[i + 1] += B_sum[i] + B[i]; ld ans = 1e18; rep(i,M) { ld cur = 0; cur += M / ld(M - i); cur += ((M - i) * N - (B_sum[M] - B_sum[i])) / ld(M - i); ans = min(ans, cur); } cout << fixed << setprecision(20) << ans + B[0] - 1.0 << endl; }