n,m = gets.chomp.split(' ').map(&:to_i)
friends_visited = Array.new(n){false}
groups = {}
group_ref = {}
group_count = 0
m.times do
    a,b = gets.chomp.split(' ').map(&:to_i)
    if friends_visited[a-1] && friends_visited[b-1] && (groups[a-1] != groups[b-1])
        group_ref[groups[a-1]] = group_ref[groups[b-1]]
    elsif !friends_visited[a-1] && friends_visited[b-1]
        friends_visited[a-1] = true
        groups[a-1] = groups[b-1]
    elsif friends_visited[a-1] && !friends_visited[b-1]
        friends_visited[b-1] = true
        groups[b-1] = groups[a-1]
    elsif !friends_visited[a-1] && !friends_visited[b-1]
        friends_visited[a-1] = true
        friends_visited[b-1] = true
        groups[a-1] = group_count
        groups[b-1] = group_count
        group_ref[group_count] = group_count
        group_count += 1
    end
end

count = Array.new(group_count){0}
n.times do |i|
    if friends_visited[i]
        count[group_ref[groups[i]]] += 1
    end
end

puts count.max