#include <iostream>  
#include <map>  
#include <set>  
#include <string>  
#include<string.h>  
#include <cstring>  
#include <cstdio>  
#include <algorithm>  
#include <cmath>  
#include <queue>  
#include <vector>  
using namespace std;  
typedef long long ll;  
  
  

 

const int maxn=55;  
int n,m;  
int a[maxn],b[maxn];  
bool graph[maxn][maxn];  
bool vis[maxn];  
  
void dfs(int v){  
    vis[v]=true;  
    for(int v2=0;v2<n;++v2){  
        if(graph[v][v2]==false) continue;  
        if(vis[v2]==true) continue;  
        dfs(v2);  
    }  
}  
  
int main(){  
    cin>>n>>m;  
    for(int i=0;i<m;i++){  
        cin>>a[i]>>b[i];  
        a[i]--,b[i]--;  
        graph[a[i]][b[i]]=graph[b[i]][a[i]]=true;  
    }  
    int ans=0;  
    for(int i=0;i<m;i++){  
        graph[a[i]][b[i]]=graph[b[i]][a[i]]=false;  
        for(int j=0;j<n;j++){  
            vis[j]=false;  
        }  
        dfs(0);  
        bool bridge=false;  
        for(int i=0;i<n;i++){  
            if(!vis[i]) bridge=true;  
        }  
        if(bridge) ans++;  
        graph[a[i]][b[i]]=graph[b[i]][a[i]]=true;  
    }  
    cout<<ans<<endl;  
    return 0;  
}  