
var data = readLine()!.split(separator: " ")
let n = Int(data[0])!
let m = Int(data[1])!
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 r[a] == 0 && r[b] == 0 {
        r[a] = group
        r[b] = group
        group += 1
    } else {
        if r[a] > 0 { r[b] = r[a] }
        else if r[b] > 0 { r[a] = r[b] }
    }
}
var s = [Int](repeating: 0, count: group)
for a in r {
    s[a] += 1
}
//print(group, r, s)
print(s[1...].max()!)
