while(n,k=gets.split.map &:to_i)[0]>0
l=(1..k).map{gets.to_i}.sort
d=l.each_cons(2).map{|i,j|"#{j-i}"}*""
p (l[0]>0?d.scan(/1+/):d[1..-1].gsub(/1+/){"#$& #$&"}.scan(/1+21*|1*21+|1+/)).map(&:size).max+(l[0]>0?1:2)
end