#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#ifdef on_linux
	#include <sys/resource.h>
#endif

#ifdef dobby_is_a_free_elf
	#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
	#define trace(...) 0;
#endif

using namespace std;
using namespace __gnu_pbds;


#define all(x)                  (x).begin(), (x).end()
#define between(i,x,y)          ((i) >= (x) && (i) <= (y))
#define DECIMAL(n)              cout << fixed << setprecision(n)
#define fi                      first
#define lbd                     lower_bound
#define mem0(x)                 memset(x, 0, sizeof (x))
#define mem1(x)                 memset(x, -1, sizeof (x))
#define mp                      make_pair
#define pb                      push_back
#define pf                      push_front
#define ppb                     pop_back
#define ppf                     pop_front
#define sc                      second
#define sqr(a)                  ((a) * (a))
#define sz(x)                   (int)((x).size())
#define ubd                     upper_bound

#define int                     long long

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template <typename T>
using ordered_set = tree<T, null_type,
      less<T>,
      rb_tree_tag,
      tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0
// order_of_key(k) returns count of elements strictly smaller than k


const long double PI = 3.14159265358979323846264338;
const double eps = 1e-10;
#ifdef int
	const long long INF = 1e18;
#else
	const long long INF = 1e9;
#endif
const int32_t fftmod = 998244353;
const int32_t MOD = 1000000007;
const int32_t N = 2e5 + 10;
const int32_t NN = 1e6 + 10;

struct DSU
{
	int32_t _parent_[N], _rank_[N], _size_[N], comp = 0;

	void make_set(int32_t v) {
		_parent_[v] = v;
		_rank_[v] = 0;
		_size_[v] = 1;
		comp++;
	}
	void init(int32_t n) {
		for (int32_t i = 0; i < n; ++i) {
			make_set(i);
		}
	}
	int32_t find_set(int32_t v) {
		if (v == _parent_[v]) {
			return v;
		}
		return _parent_[v] = find_set(_parent_[v]);
	}
	void merge(int32_t a, int32_t b) {
		a = find_set(a);
		b = find_set(b);
		if (a != b) {
			if (_rank_[a] < _rank_[b]) {      //merge by height
				swap(a, b);
			}
			_parent_[b] = a;
			if (_rank_[a] == _rank_[b]) {
				_rank_[a]++;
			}

			// if (_size_[a] < _size_[b])            //merge by size
			//     swap(a, b);
			// _parent_[b] = a;
			_size_[a] += _size_[b];
			comp--;
		}
	}
} dsu;
inline void elf_magic(int testcase)
{
	int n, m;
	cin >> n >> m;
	dsu.init(n);
	for (int i = 0; i < m; ++i) {
		int a, b;
		cin >> a >> b;
		a--, b--;
		dsu.merge(a, b);
	}
	int ans = 0;
	for (int i = 0; i < n; ++i) {
		ans = max((int32_t)ans, dsu._size_[i]);
	}
	cout << ans;
	return;
}

int32_t main()
{
	#ifdef on_linux
	rlimit cpu_time {.rlim_cur = 2, .rlim_max = RLIM_INFINITY};
	setrlimit(RLIMIT_CPU, &cpu_time);
	#endif

	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int TESTS = 1;
	//cin >> TESTS;
	for (int i = 1; i <= TESTS; ++i) {
		// cout << "Case #" << i << ": ";
		elf_magic(i);
		if (i != TESTS)	{ cout << '\n'; }
	}
	return 0;
}

Measured memory_bytes: 5936