#include<bits/stdc++.h>
using namespace std;
vector<int> ve[55000];
int root,index,n,m,ans;
int num[55000],low[55000];
void dfs(int cur,int father)
{
    index++;
    num[cur]=index;
    low[cur]=index;
    for(int i=0;i<ve[cur].size();i++){
        int qq=ve[cur][i];
        if(num[qq]==0){
            dfs(qq,cur);
            low[cur]=min(low[qq],low[cur]);
            if(low[qq]>num[cur])
                ans++;
        }else if(qq!=father){
            low[cur]=min(low[cur],num[qq]);
        }
    }
}
int main()
{
    while(scanf("%d%d",&n,&m)!=EOF){
        for(int i=0;i<=n;i++) ve[i].clear();
        for(int i=0;i<m;i++){
            int a,b;
            scanf("%d%d",&a,&b);
            ve[a].push_back(b);
            ve[b].push_back(a);
        }
        root=1;
        ans=index=0;
        dfs(1,root);
        printf("%d\n",ans);
    }
    return 0;
}
