//  [typescript]
// @ts-ignore
import * as fs from 'fs';

// main
function main(input: string[]) {
    // param
    var n: number;
    var m: number;
    var am: number[] = [];
    var bm: number[] = [];
    // init
    [n, m] = input.shift().split(" ").map(x => Number(x));
    for (var mx = 0; mx < m; mx ++) {
        [am[mx], bm[mx]] = input[mx].split(" ").map(x => Number(x) - 1);
    }
    // process
    UF_initRoot(n);
    for (var mx = 0; mx < m; mx ++) {
        UF_mergeRoot(am[mx], bm[mx]);
    }
    // answer
    console.log(Math_max(g_uf_count));
}

// math library
function Math_max(arr: number[]): number { return arr.reduce((x, y) => Math.max(x, y)); }
function Math_min(arr: number[]): number { return arr.reduce((x, y) => Math.min(x, y)); }
function Math_gcd(): number {
    var ans = arguments[0];
    var f = (a: number, b: number): number => b ? f(b, a % b) : a
    for (var i = 1; i < arguments.length; i++) {
        ans = f(ans, arguments[i]);
    }
    return ans
};
function Math_gcdArray(val: number[]): number {
    var ans = val[0];
    var f = (a: number, b: number): number => b ? f(b, a % b) : a
    for (var i = 1; i < val.length; i++) {
        ans = f(ans, val[i]);
    }
    return ans
};
function Math_lcm(): number {
    var a = arguments
    var g = (n: number, m: number): number => m ? g(m, n % m) : n
    var l = (n: number, m: number): number => n * m / g(n, m)
    var ans = a[0]
    for (var i = 1; i < a.length; i++) {
        ans = l(ans, a[i])
    }
    return ans
}
function Math_lcmArray(val: number[]): number {
    var a = val
    var g = (n: number, m: number): number => m ? g(m, n % m) : n
    var l = (n: number, m: number): number => n * m / g(n, m)
    var ans = a[0]
    for (var i = 1; i < a.length; i++) {
        ans = l(ans, a[i])
    }
    return ans
}
function Math_primeList(val: number): number[] {
    var ans = [];
    var arr = new Array(val).fill(0);
    for (var i = 2; i < val; i++) {
        if (arr[i] == 0) {
            for (var j = i; j < val; j += i) {
                if (arr[j] == 0) arr[j] = i;
            }
        }
    }
    for (var i = 2; i < val; i++) {
        if (arr[i] == i) ans.push(i);
    }
    return ans;
}
function Math_primeFactor(p: number[], val: number): number[][] {
    var ans: number[][] = [];
    var valmax = val / 2;;
    for (var i = 0; i < p.length; i++) {
        var prime = p[i];
        if (valmax < prime) break;
        var cnt = 0;
        while (val % prime == 0) {
            val /= prime;
            cnt++;
        }
        if (cnt != 0) {
            ans.push([prime, cnt]);
        }
        if (val == 1) break;
    }
    return ans;
}

// union-find library
var g_uf_root: number[];
var g_uf_count: number[];
function UF_initRoot(num: number) {
    g_uf_root = new Array(num).fill(-1);
    g_uf_count = new Array(num).fill(1);
}
function UF_getRoot(idx: number) {
    if (g_uf_root[idx] < 0) {
        return idx;
    } else {
        var wrk0: number = UF_getRoot(g_uf_root[idx]);
        g_uf_root[idx] = wrk0;
        return wrk0
    }
}
function UF_mergeRoot(a: number, b: number) {
    var root0: number = UF_getRoot(a);
    var root1: number = UF_getRoot(b);
    if (root0 == root1) return;
    if (root0 > root1) [root0, root1] = [root1, root0];
    g_uf_count[root0] += g_uf_count[root1];
    g_uf_count[root1] = 0;
    g_uf_root[root1] = root0;
}

// entrypoint
function entrypoint() {
    try {
        var input = fs.readFileSync("/dev/stdin", "utf8").trim().split("\n");
        console.debug = function () { };
        main(input);
    }
    catch (ex) {
        console.log("----");
        console.log("file='%s'", __filename.split("\\").slice(-1)[0]);
        console.log("----");
        const lines: string[] = [];
        // @ts-ignore
        const reader = require('readline').createInterface({
            // @ts-ignore
            input: process.stdin,
            // @ts-ignore
            output: process.stdout
        });
        reader.on('line', function (line: string) {
            lines.push(line);
        });
        reader.on('close', function () {
            input = lines;
            console.log("input=%o", input);
            console.time();
            console.log("----")
            main(input);
            console.log("----")
            console.timeEnd();
        });
    }
}
entrypoint();