using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Text;

namespace AtCoder.ABC
{
    class QuestionD
	{
		public static void Main(string[] args)
		{
			var scanner = new Scanner();

			var (n, m) = scanner.Int2();

			var union = new UnionFind(n);

			for(int i = 0; i < m; i++) {
				var (a, b) = scanner.Int2(-1);

				union.Union(a, b);
			}

			Console.WriteLine(union.MaxCount);
		}

		public class UnionFind
		{
			private readonly int[] parents;
			private readonly int[] counts;
			public int MaxCount = 1;

			public UnionFind(int n)
			{
				parents = new int[n];
				counts = new int[n];
				for (int i = 0; i < n; i++) {
					parents[i] = i;
					counts[i] = 1;
				}
			}

			public int Find(int v)
			{
				while (v != parents[v]) {
					v = parents[v];
				}

				return v;
			}

			public void Union(int x, int y)
			{
				int px = Find(x);
				int py = Find(y);
				if (px == py) {
					return;
				}

				if (counts[px] < counts[py]) {
					parents[px] = py;
					counts[py] += counts[px];

					MaxCount = Math.Max(MaxCount, counts[py]);
				} else {
					parents[py] = px;
					counts[px] += counts[py];

					MaxCount = Math.Max(MaxCount, counts[px]);
				}
			}

			public long Count(int v)
			{
				return counts[Find(v)];
			}
		}
		public class Scanner
		{
			private readonly char[] delimiter_ = new char[] { ' ' };
			private readonly string filePath_;
			private readonly Func<string> reader_;
			private string[] buf_;
			private int index_;

			public Scanner(string file = "")
			{
				if (string.IsNullOrWhiteSpace(file)) {
					reader_ = Console.ReadLine;
				} else {
					filePath_ = file;
					var fs = new StreamReader(file);
					reader_ = fs.ReadLine;
				}
				buf_ = new string[0];
				index_ = 0;
			}

			public string NextLine() => reader_();
			public string Next()
			{
				if (index_ < buf_.Length) {
					return buf_[index_++];
				}

				string st = reader_();
				while (st == "") {
					st = reader_();
				}

				buf_ = st.Split(delimiter_, StringSplitOptions.RemoveEmptyEntries);
				if (buf_.Length == 0) {
					return Next();
				}

				index_ = 0;
				return buf_[index_++];
			}

			public int Int() => int.Parse(Next());
			public long Long() => long.Parse(Next());
			public double Double() => double.Parse(Next());

			public int[] ArrayInt(int N, int add = 0)
			{
				int[] Array = new int[N];
				for (int i = 0; i < N; i++) {
					Array[i] = Int() + add;
				}
				return Array;
			}

			public long[] ArrayLong(int N, long add = 0)
			{
				long[] Array = new long[N];
				for (int i = 0; i < N; i++) {
					Array[i] = Long() + add;
				}
				return Array;
			}

			public double[] ArrayDouble(int N, double add = 0)
			{
				double[] Array = new double[N];
				for (int i = 0; i < N; i++) {
					Array[i] = Double() + add;
				}
				return Array;
			}

			public (int, int) Int2(int add = 0)
			{
				var array = ArrayInt(2, add);
				return (array[0], array[1]);
			}

			public (int, int, int) Int3(int add = 0)
			{
				var array = ArrayInt(3, add);
				return (array[0], array[1], array[2]);
			}

			public (long, long) Long2(int add = 0)
			{
				var array = ArrayLong(2, add);
				return (array[0], array[1]);
			}

			public (long, long, long) Long3(int add = 0)
			{
				var array = ArrayLong(3, add);
				return (array[0], array[1], array[2]);
			}

			public (double, double) Double2(int add = 0)
			{
				var array = ArrayDouble(2, add);
				return (array[0], array[1]);
			}

			public (double, double, double) Double3(int add = 0)
			{
				var array = ArrayDouble(3, add);
				return (array[0], array[1], array[2]);
			}

			public void Save(string text)
			{
				if (string.IsNullOrWhiteSpace(filePath_)) {
					return;
				}

				File.WriteAllText(filePath_ + "_output.txt", text);
			}
		}
	}
}


Measured memory_bytes: 42184