#include<bits/stdc++.h>
using namespace std;
const int maxn=55;
int n,m,ans=0;
int a[maxn],b[maxn];
int graph[maxn][maxn];
bool vis[maxn];
void dfs(int x)
{
	vis[x]=true;
	for(int i=0;i<n;i++)
	{
		if(!graph[x][i]||vis[i])
			continue;
		dfs(i);
	}
}
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=0;i<maxn;i++)
		for(int j=0;j<maxn;j++)
			graph[i][j]=false;
	for(int i=0;i<m;i++)
	{
		scanf("%d%d",a+i,b+i);
		--a[i],--b[i];
		graph[a[i]][b[i]]=true;
		graph[b[i]][a[i]]=true;
	}
	for(int i=0;i<m;i++)
	{
		graph[a[i]][b[i]]=false;
		graph[b[i]][a[i]]=false; 
		memset(vis,false,sizeof(vis));
		dfs(0);
		int bridge=false;
		for(int j=0;j<n;j++)
			if(!vis[j])
			{
				bridge=true;
				break;
			}
		ans+=bridge;
		graph[a[i]][b[i]]=true;
		graph[b[i]][a[i]]=true;
	}
	cout<<ans<<endl;
	return 0;
}