#include<bits/stdc++.h>

using namespace std;

int ans, n, m, a[50], b[50];
bool g[50][50];
bool c[50];

void dfs(int v, int to, int from){
	c[v] = true;
	for(int i = 0; i < n; ++i){
		if(v == to && i == from) continue;
		if(v == from && i == to) continue;
		if(g[v][i] && !c[i]) dfs(i, to, from);
	}
}

bool isBridge(int to, int from){
	bool res = false;
	for(int j = 0; j < n; ++j) c[j] = false;
	dfs(0, to, from);
	for(int i = 0; i < n; ++i) if(!c[i]) res = true;
	return res;
}

int main(){
	cin >> n >> m;
	for(int i = 0; i < m; ++i){
		cin >> a[i] >> b[i]; --a[i]; --b[i];
		g[a[i]][b[i]] = true;
		g[b[i]][a[i]] = true;
	}
	
	for(int i = 0; i < m; ++i){
		if(isBridge(a[i], b[i])) ans++;
	}
	
	cout << ans << endl;
}