func main2(input1: String = readLine()!) {
    let integers = input1.split(separator: " ").map { Int($0)! }
    let n = integers[0]
    let m = integers[1]
    
    var parents = [Int](repeating: -1, count: n)
    
    func groupLeader(of someone: Int) -> Int {
        let parent = parents[someone]
        if parent < 0 {
            return someone
        } else {
            let leader = groupLeader(of: parent)
            parents[someone] = leader
            return leader
        }
    }
    
    for _ in 0..<m {
        let integers = readLine()!.split(separator: " ").map { Int($0)! }
        let a = integers[0] - 1
        let b = integers[1] - 1
        
        var leader1 = groupLeader(of: a)
        var leader2 = groupLeader(of: b)
        if leader1 == leader2 { continue }
        if parents[leader1] > parents[leader2] {
            swap(&leader1, &leader2)
        }
        parents[leader1] += parents[leader2]
        parents[leader2] = leader1
    }
    
    var answer = 0
    for someone in 0..<n {
        answer = max(answer, -parents[groupLeader(of: someone)])
    }
    print(answer)
}

main2()