#include using namespace std; int main(){ cout << fixed << setprecision(20); int N, M; cin >> N >> M; vector B(M); for (int i = 0; i < M; i++){ cin >> B[i]; B[i]--; } double tv = N, fv = 0; for (int i = 0; i < 100; i++){ double mid = (tv + fv) / 2; double sum = 0; for (int j = 0; j < M; j++){ sum += min(mid + 1, (double) N - B[j]); } sum /= M; if (sum < mid){ tv = mid; } else { fv = mid; } } cout << min((double) N - 1, B[0] + tv) << endl; }