#include using namespace std; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, n) for (int i=(int)(n)-1; (i)>=(int)(m); --(i)) #define all(x) (x).begin(), (x).end() int main() { int n, m; cin >> n >> m; vector b(m); rep(i, m) cin >> b[i]; double mval = 0.0; ll sum = 0; repr(i, m) { sum += b[i]; mval = max(mval, ((double)(sum)/(m-i))-(b.front()+((double)m/(m-i)))); } printf("%.6f\n", (double)((n-1)-mval)); return 0; }