#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#define lol(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
vector<int> v[60];
bool vis[60];
void DFS(int x,bool first,int to){
	if(vis[x]==true)return;
	vis[x]=true;
	lol(i,v[x].size()){
		if(first&&v[x][i]==to)continue;
		DFS(v[x][i],false,to);
	}
}
int main(){
	int n,m;
	cin>>n>>m;
	lol(i,m){
		int a,b;cin>>a>>b;a--,b--;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	int ans=0;
	lol(i,n){
		lol(j,v[i].size()){
			lol(k,n)vis[k]=false;
			DFS(i,true,v[i][j]);
			if(vis[v[i][j]]==false){
				ans++;
			}
		}
	}
	cout<<ans/2<<endl;
	return 0;
}
