#include<iostream>
#include<algorithm>

using namespace std;

int main() {

  int n, m, i, in, def = 0, ans = 0, before = 0;

  cin >> n >> m;
  
  for(i = 0; i < m; i++) {
    cin >> in;
    
    if(i == 0 && in != 1) {
      def = in - 1;
    }

    else def = (in-before)/2 +0.5;

    ans = max(ans, def);

    before = in;
  }

  ans = max(ans, n - in);
  cout << ans << endl;

  return 0;
}