#define _DEBUG #include "bits/stdc++.h" //#include #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,a4,a5,x,...) x #define debug_1(x1) cout<<#x1<<": "<=0;index--) #define brep1(index,num) for(int index=(int)num;index>0;index--) #define scan(argument) cin>>argument #define prin(argument) cout< pll; typedef pair pint; typedef vector vint; typedef vector vll; typedef vector vpint; typedef vector vpll; template bool chmax(T &a, const T &b) { if (a bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } ll INFl=(ll)1e+18+1; int INF=1e+9+1; ll x[100001]; ll ruix[100001]; int main(){ ll N,M; scan(N>>M); rep(i,M) scan(x[i]); if(M==1){ prin(N-1); return 0; } brep(i,M) ruix[i]=ruix[i+1]+x[i]; ld warpkitaimin=INFl; rep1(k,M-1){ ld warpkitai=N-(ld)(ruix[k]-k)/(M-k); chmin(warpkitaimin,warpkitai); } prind(min((ld)(N-1),x[0]+warpkitaimin)); return 0; }