n,m = gets.split.map(&:to_i)
if m == 0
  puts n
  exit
end

ans = Array.new(n){0}
check = []
(0...m).each do |i|
  a,b = gets.split.map(&:to_i).sort
  next if check.any?([a,b])
  check << [a,b]
  ans[a-1] += 1
end
puts ans.max+1
