#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i, N) for (int i = 0; i < N; ++i)
typedef long long int LL;

int N, M, a[100], b[100];
std::vector<int> G[100];
int S[100], D[100], ans;

void dfs(int p, int d, int pr)
{
	D[p] = d;
	for (auto i : G[p])
	{
		if (pr == i)
		{
			continue;
		}
		if (!D[i])
		{
			dfs(i, d + 1, p);
			if (!S[i])
			{
				++ans;
			}
			S[p] += S[i];
		}
		else if (D[p] > D[i])
		{
			S[i]--, S[p]++;
		}
	}
}
int main()
{
	in >> N >> M;
	rep(i, M) { in >> a[i] >> b[i]; }

	rep(i, M)
	{
		G[a[i]].push_back(b[i]);
		G[b[i]].push_back(a[i]);
	}
	dfs(1, 1, -1);
	out << ans << std::endl;
	return 0;
}