#include <iostream>

using namespace std;

int main()
{
  int n, m;
  int a, last_a;
  int max_diff = 0;
  int diff;

  cin >> n >> m;

  cin >> a;
  last_a = a;
  max_diff = a -1;

  for (int i = 1; i < m; i++) {
    cin >> a;
    diff = a - last_a - 1;
    !(diff % 2) ? diff /= 2 : diff = diff / 2 + 1;
    if (diff > max_diff) max_diff = diff;
    last_a = a;
  }

  if (n - a > max_diff) max_diff = n - a;

  cout << max_diff << endl;
}

