#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<vector>
using namespace std;

const int maxn=1e3+10;
int n,m,ans,dfn,low[maxn],pre[maxn];
vector<int> g[maxn];

void dfs(int pos,int fa){
	pre[pos]=low[pos]=++dfn;
	for(int i=0;i<g[pos].size();++i)
		if(!pre[g[pos][i]]){
			dfs(g[pos][i],pos);
			low[pos]=min(low[pos],low[g[pos][i]]);
			if(low[g[pos][i]]>pre[pos])
				++ans;
		}
		else if(g[pos][i]!=fa)
			low[pos]=min(low[pos],pre[g[pos][i]]);
}

int main(){
	cin>>n>>m;
	for(int i=0,u,v;i<m;++i){
		cin>>u>>v;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	dfs(1,0);
	printf("%d\n",ans);
	return 0;
}