#include <bits/stdc++.h>
using namespace std;

int main() {
	int N, M;
	cin >> N >> M;
	long long int ans = LLONG_MIN / 6;
	long long int now;
	cin >> ans;
	now = ans;
	ans--;
	for( size_t i = 1; i < M; i++ ) {
		long long int a;
		cin >> a;
		ans = max( (a - now) / 2, ans );
		now = a;
	}
	ans = max( N - now, ans );
	cout << ans << endl;
}