


class UnionFind(val size: Int) {
    private val vec = IntArray(size){-1}
    fun root(a: Int): Int {
        return if (vec[a] < 0) {
            a
        }else {
            val root = root(vec[a])
            vec[a] = root
            root
        }
    }
    fun sizeOf(a: Int): Int {
        return -vec[root(a)]
    }
    fun unite(a: Int, b: Int) {
        val ar = root(a)
        val br = root(b)
        if (ar == br) return
        if (vec[ar] < vec[br]) {
            vec[ar] += vec[br]
            vec[br] = ar
        }else {
            vec[br] += vec[ar]
            vec[ar] = br
        }
    }
}
fun main() {
    val (n, m) = readLine()!!.trim().split(' ').map(String::toInt)
    val uft = UnionFind(n)
    repeat(m) {
        val (a, b) = readLine()!!.trim().split(' ').map(String::toInt)
        uft.unite(a - 1, b - 1)
    }
    println((0 until n).map{uft.sizeOf(it)}.max()!!)
}