open System

// 受け取った番号を配列番号に変換
let toArr (x : int[])= 
    let l = x.Length - 1
    [| for i in 0 .. l -> x.[i] - 1 |]

let mutable  [|N; M|] = stdin.ReadLine().Split(' ') |> Array.map int |> toArr



let mutable parent = [| for i in 0 .. N -> i  |]
let mutable size = [| for i in 0 .. N -> 1 |]

let rec root a = if a = parent.[a] then a else root parent.[a]

let unit a b = 
        let ra = root a
        let rb = root b
        if ra <> rb then 
            if ra < rb then 
                parent.[rb] <- ra
                size.[ra] <- size.[ra] + size.[rb]
                parent.[b] <- ra
            else 
                parent.[ra] <- rb
                size.[rb] <- size.[rb] + size.[ra]
                parent.[a] <- rb

for i in 0 .. M do
    let [|A; B|] = stdin.ReadLine().Split(' ') |> Array.map int |> toArr

    unit A B

let mutable max = 0
for i in 0 .. N do
    max <- if max > size.[i] then max else size.[i]

max |> printf "%d"    