#define _USE_MATH_DEFINES
#include <iostream>
#include <fstream>
#include<vector>
#include<algorithm>
using namespace std;

struct init{
	init(){
		cin.tie(0); ios::sync_with_stdio(false);
	}
}________init;
int main() {

#ifdef INPUT_FROM_FILE
	ifstream cin("sample.in");
	ofstream cout("sample.out");
#endif
	int n, m;
	cin >> n >> m;
	vector<int> a(m);
	for (auto& it : a){
		cin >> it;
	}
	int res = 0;
	res = max(res, n - a[m - 1]);
	res = max(res, a[0] - 1);
	for (int i = 1; i < m; i++){
		res = max(res, (a[i] - a[i - 1]) / 2);
	}
	cout << res << endl;
	return 0;
}