//  [rust]
/// input macro from https://qiita.com/tanakh/items/1ba42c7ca36cd29d0ac8
macro_rules ! read_value {($ next : expr , ($ ($ t : tt ) ,* ) ) => {($ (read_value ! ($ next , $ t ) ) ,* ) } ; ($ next : expr , [$ t : tt ; $ len : expr ] ) => {(0 ..$ len ) . map (| _ | read_value ! ($ next , $ t ) ) . collect ::< Vec < _ >> () } ; ($ next : expr , chars ) => {read_value ! ($ next , String ) . chars () . collect ::< Vec < char >> () } ; ($ next : expr , usize1 ) => {read_value ! ($ next , usize ) - 1 } ; ($ next : expr , $ t : ty ) => {$ next () . parse ::<$ t > () . expect ("Parse error" ) } ; }
macro_rules ! input_inner {($ next : expr ) => {} ; ($ next : expr , ) => {} ; ($ next : expr , $ var : ident : $ t : tt $ ($ r : tt ) * ) => {let $ var = read_value ! ($ next , $ t ) ; input_inner ! {$ next $ ($ r ) * } } ; }
macro_rules ! input {(source = $ s : expr , $ ($ r : tt ) * ) => {let mut iter = $ s . split_whitespace () ; let mut next = || {iter . next () . unwrap () } ; input_inner ! {next , $ ($ r ) * } } ; ($ ($ r : tt ) * ) => {let stdin = std :: io :: stdin () ; let mut bytes = std :: io :: Read :: bytes (std :: io :: BufReader :: new (stdin . lock () ) ) ; let mut next = move || -> String {bytes . by_ref () . map (| r | r . unwrap () as char ) . skip_while (| c | c . is_whitespace () ) . take_while (| c |! c . is_whitespace () ) . collect () } ; input_inner ! {next , $ ($ r ) * } } ; }

macro_rules ! rough_print {($ x : expr $ (, $ s : expr ) * ) => {print ! ("{:?}" , $ x ) ; $ (print ! (", {:?}" , $ s ) ; ) * println ! ("" ) ; } ; }

struct UnionFind<T>
where
    T: Clone + Eq + std::hash::Hash,
{
    map:  std::collections::HashMap<T, usize>,
    par:  Vec<T>,
    rank: Vec<usize>,
}
impl<T> UnionFind<T>
where
    T: Clone + Eq + std::hash::Hash,
{
    fn new(init: Vec<T>) -> Self {
        let len = init.len();
        let mut map = std::collections::HashMap::new();
        for (i, v) in init.iter().enumerate() {
            map.insert(v.clone(), i);
        }
        Self {
            map:  map,
            par:  init,
            rank: vec![0; len],
        }
    }

    fn find(&mut self, i: T) -> T {
        let i_ind = {
            if let Some(&ind) = self.map.get(&i) {
                ind
            }
            else {
                panic!("The value can't be found. [in find of UnionFind]");
            }
        };
        if i == self.par[i_ind] {
            return i;
        }
        else {
            let par = self.par[i_ind].clone();
            let tmp = self.find(par);
            self.par[i_ind] = tmp.clone();
            return tmp;
        }
    }

    #[inline]
    fn same(&mut self, i: T, j: T) -> bool { self.find(i) == self.find(j) }

    fn unite(&mut self, i: T, j: T) {
        let i_par = self.find(i);
        let j_par = self.find(j);
        let i_par_ind = {
            if let Some(&ind) = self.map.get(&i_par) {
                ind
            }
            else {
                panic!("The value can't be found. [in unite of UnionFind]");
            }
        };
        let j_par_ind = {
            if let Some(&ind) = self.map.get(&j_par) {
                ind
            }
            else {
                panic!("The value can't be found. [in unite of UnionFind]");
            }
        };
        if self.rank[i_par_ind] > self.rank[j_par_ind] {
            self.par[j_par_ind] = i_par;
        }
        else {
            self.par[i_par_ind] = j_par;
            if self.rank[i_par_ind] == self.rank[j_par_ind] {
                self.rank[j_par_ind] += 1;
            }
        }
    }
}
fn solve() {
    input!(n: usize, m: usize, a: [(usize1, usize1); m]);
    let mut uf = UnionFind::new((0..n).collect());

    for (i, j) in a {
        uf.unite(i, j);
    }

    let mut counter = vec![0 as u64; n];
    for i in 0..n {
        let tmp = uf.find(i);
        counter[tmp] += 1;
    }

    let mut max_c = 1;
    for c in counter {
        if c > max_c {
            max_c = c;
        }
    }

    rough_print!(max_c);
}

fn main() {
    std::thread::Builder::new()
        .name("solve".into())
        .stack_size(256 * 1024 * 1024)
        .spawn(solve)
        .unwrap()
        .join()
        .unwrap();
}