require 'set'
N, M = gets.split.map &:to_i
link = M.times.map{ gets.split.map(&:to_i).sort }&.sort
clusters = []
idx = Array.new(200005)
link.each do |a, b|
    if !i = idx[a] || idx[b]
        clusters << Set.new([a, b])
        idx[a] = clusters.size-1
        idx[b] = clusters.size-1
    else
        clusters[i] << a
        clusters[i] << b
        idx[a] = clusters.size-1
        idx[b] = clusters.size-1
    end
end
calc = clusters.max_by{|cluster| cluster.size}&.size
p calc ? calc : 1