#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the flatlandSpaceStations function below.
def flatlandSpaceStations(n, c):
    if n==len(c):
        return 0
    c.sort()
    maxx=c[0]-0
    for i in range(len(c)-1):
        diff=c[i+1] -c[i]
        if diff//2 > maxx:
            maxx=diff//2
    if n - c[-1] -1>maxx:
        maxx= n - c[-1]-1
    return maxx
        
    
    



if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    nm = input().split()

    n = int(nm[0])

    m = int(nm[1])

    c = list(map(int, input().rstrip().split()))

    result = flatlandSpaceStations(n, c)

    fptr.write(str(result) + '\n')

    fptr.close()
