n,m=map(int,input().split()) b=list(map(int,input().split())) ans=[n-1] ct=0 for i in range(m-1,-1,-1): ct+=b[-1]-b[i] x=m/(m-i)+ct/(m-i) ans.append(x+(n-b[-1])+(b[0]-1)) print(min(ans))