n, m = gets.chomp.split.map(&:to_i)
friends = Array.new(n).map{Array.new}
m.times do
    a, b = gets.chomp.split.map(&:to_i)
    friends[a-1] << b-1
    friends[b-1] << a-1
end
ans = 0
friends.each do |ar|
    tmp = ar.uniq.size + 1
    ans = ans < tmp ? tmp : ans
end
puts ans