n, m = io.read('n'), io.read('n')
e = {}
for i = 1, n do e[i] = {} end
for i = 1, m do
    local u, v = io.read('n'), io.read('n')
    e[u][#e[u] + 1] = v
    e[v][#e[v] + 1] = u
end

dfn, low = {}, {}
tot = 0
bridge_count = 0

dfs = function (u, p)
    tot = tot + 1
    dfn[u] = tot
    low[u] = tot
    for _, v in ipairs(e[u]) do if v ~= p then
        if dfn[v] == nil then
            dfs(v, u)
            low[u] = math.min(low[u], low[v])
        else
            low[u] = math.min(low[u], dfn[v])
        end
    end end
    if p ~= -1 and low[u] > dfn[p] then
        bridge_count = bridge_count + 1
    end
end

for i = 1, n do if dfn[i] == nil then dfs(i, -1) end end

print(bridge_count)
