n,m = gets.split.map(&:to_i)
if m == 0
  puts n
  exit
end
ans = Array.new(n/2+1){Array.new(n){0}}

(0...m).each do |i|
  a,b = gets.split.map(&:to_i).sort
  ans[a-1][b-1] = 1
end
res = 0
ans.each do |ai|
  next if ai.empty?
  res = [res,ai.sum].max
end
puts res+1
