import kotlin.math.max

fun main(args: Array<String>) {
    val (n, m) = readIntList()

    val uf = UnionFind(n)
    repeat(m) {
        val (a, b) = readIntList().map { it - 1 }
        uf.unite(a, b)
    }

    var ans = 0
    for (i in 0 until n) {
        ans = max(ans, uf.size(i))
    }
    println(ans)
}

// read
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)

class UnionFind(size: Int) {
    private val r: MutableList<Int> = MutableList(size) { -1 }

    fun root(x: Int): Int {
        if (r[x] < 0) return x
        r[x] = root(r[x])
        return r[x]
    }

    fun unite(x: Int, y: Int): Boolean {
        var x = root(x)
        var y = root(y)
        if (x == y) return false
        if (r[x] > r[y]) x = y.also { y = x }
        r[x] += r[y]
        r[y] = x
        return true
    }

    fun size(x: Int): Int = -r[root(x)]
}