#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

const int maxn = 100;
int p[maxn][maxn];
int vis[maxn];
int edger[maxn],edgec[maxn];
int n;

void dfs(int j)
{
    for(int i = 1; i <= n; i++)
    {
        if(!vis[i] && p[j][i])
        {
            vis[i] = 1;
            dfs(i);
        }
    }
    return;
}
bool ifspecial(int i)
{
    p[edger[i]][edgec[i]] = 0;
    p[edgec[i]][edger[i]] = 0;
    memset(vis,0,sizeof vis);
    int cnt = 0;
    for(int i = 1; i <= n; ++i)
    {
        if(!vis[i])
        {
            dfs(i);
            cnt++;
        }
    }
    p[edger[i]][edgec[i]] = 1;
    p[edgec[i]][edger[i]] = 1;
    if(cnt == 1)
        return false;
    else
        return true;
}

int main()
{
#ifdef local
    freopen("in.txt","r",stdin);
#endif // local
    ios::sync_with_stdio(0),cin.tie(0);
    int m;
    cin >> n >> m;
    for(int i = 0; i < m; ++i)
    {
        int a,b;
        cin >> a >> b;
        p[a][b] = 1;
        p[b][a] = 1;
        edger[i] = a;
        edgec[i] = b;
    }

    int ans = 0;
    for(int i = 0; i < m; ++i)
        if(ifspecial(i))
           ans++;
    cout << ans;

    return 0;
}
