n, m = gets.split.map(&:to_i)

@par = Array.new(n+1) {|i| i}
@count = Array.new(n+1, 1)

find =->(x){@par[x] = @par[x] == x ? x : find.(@par[x])}
union =->(x, y) {
    x = find.(x)
    y = find.(y)
    return if x == y
    @par[x] = y
    @count[y] += @count[x]
}

m.times do
    a, b = gets.split.map(&:to_i)
    union.(a, b)
end

puts @count.max