fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(' ').map(String::toInt)
    val links = Array(n) { mutableListOf<Int>() }
    val edges = Array(m) {
        val (a, b) = readLine()!!.split(' ').map { it.toInt() - 1 }
        links[a].add(b)
        links[b].add(a)
        a to b
    }
    fun isBridge(e: Pair<Int, Int>): Boolean {
        val removedLinks = links.mapIndexed { src, dists ->
            if (src == e.first || src == e.second) {
                dists.filter { it != e.first && it != e.second }
            } else {
                dists
            }
        }
        if (removedLinks.any(List<Int>::isEmpty)) return true
        val visited = hashSetOf<Int>()
        fun visit(src: Int) {
            visited.add(src)
            removedLinks[src].filterNot { it in visited }.forEach(::visit)
        }
        visit(0)
        return visited.size != n
    }
    val ans = edges.filter(::isBridge).count()
    println(ans)
}
