local n,m=io.read("n","n")
local a={}
local b={}
local visited={}
local graph={}
for i=1,n do
    graph[i]={}
    for j=1,n do
        graph[i][j]=false
    end
end

local function dfs(x)
    visited[x]=true
    for y=1,n do
        if graph[x][y]==false then
            goto continue
        end
        if visited[y]==true then
            goto continue
        end
        dfs(y)
        ::continue::
    end
end

for i=1,m do
    local x,y=io.read("n","n")
    a[i]=x
    b[i]=y
    graph[x][y]=true
    graph[y][x]=true
end

local counter=0
for i=1,m do
    graph[a[i]][b[i]]=false
    graph[b[i]][a[i]]=false
    for j=1,n do
        visited[j]=false
    end
    dfs(1)
    local bridge=false
    for j=1,n do
        if visited[j]==false then
            bridge=true
        end
    end
    if bridge==true then
        counter=counter+1
    end
    graph[a[i]][b[i]]=true
    graph[b[i]][a[i]]=true
end
print(counter)