require 'set'
n,m = gets.split.map(&:to_i)
check = Array.new(n+1){Set.new}
max = 1
m.times do
  a,b = gets.split.map(&:to_i)
  check[b].add?(a)
  check[a].add?(b)
end
ans = 0
check.each do |c|
  ans = [ans,c.length+1].max
end
p ans
