
var data = readLine()!.split(separator: " ")
let n = Int(data[0])!
let m = Int(data[1])!
var valueset: Set<SIMD2<Int>> = []
for _ in 0..<m {
    data = readLine()!.split(separator: " ")
    let a = Int(data[0])!
    let b = Int(data[1])!
    if a < b {
        valueset.insert(.init(x: a, y: b))
    } else {
        valueset.insert(.init(x: b, y: a))
    }
}
var r = [Int](repeating: 0, count: n+1)
for value in valueset {
    let a = value.x, b = value.y
     r[a] += 1;r[b] += 1
}
// print(valueset)
// print(r)
print(r.max()! + 1)
