
var data = readLine()!.split(separator: " ")
let n = Int(data[0])!
let m = Int(data[1])!
var values = Set<SIMD2<Int>>()
var r = [Int](repeating: 0, count: n)
var group = 1
for _ in 0..<m {
    data = readLine()!.split(separator: " ")
    let a = Int(data[0])! - 1
    let b = Int(data[1])! - 1
    if a < b { values.insert(.init(x: a, y: b)) }
    else { values.insert(.init(x: b, y: a)) }
}
let arr = values.map { $0  }.sorted(by: { $0.x < $1.x } )
//print(arr)
for d in arr {
    if r[d.x] == 0 && r[d.y] == 0 {
        r[d.x] = group
        r[d.y] = group
        group += 1
    } else {
        if r[d.x] > 0 { r[d.y] = r[d.x] }
        else { r[d.x] = r[d.y] }
    }
}
var s = [Int](repeating: 0, count: group)
for a in r {
    s[a] += 1
}
//print(group, r, s)
print(s[1...].max()!)
