n,m = gets.strip.split.map(&:to_i)
ary = []
m.times do
  a,b = gets.strip.split.map(&:to_i)
  ary.unshift([a,b].to_a)
  ary.unshift([b,a].to_a)
end
nw = ary.uniq
ne = nw.flatten
num = Array.new(n,0)
i = 0
while i < ne.size do
  num[ne[i]-1] += 1
  i += 1
end
puts (num.max/2)+1