fun c75(args: Array<String>) {
    val (n, m) = args[0].split(" ").map { it.toInt() }
    val edgeList = args.drop(1).map { edge -> edge.split(" ").map { it.toInt() } }
    val edgeMap = Array(n) { mutableListOf<Int>() }
    edgeList.forEach {
        edgeMap[it[0] - 1].add(it[1] - 1)
        edgeMap[it[1] - 1].add(it[0] - 1)
    }

    var ans = 0
    for (unusedEdge in edgeList) {
        val visited = Array(n) { false }
        fun dfs(curr: Int) {
            if (visited[curr]) {
                return
            }
            visited[curr] = true
            edgeMap[curr]
                    .filter { next -> !((curr == unusedEdge[0] - 1 && next == unusedEdge[1] - 1) || (curr == unusedEdge[1] - 1 && next == unusedEdge[0] - 1)) }
                    .forEach { next -> dfs(next) }
        }
        dfs(0)
        val split = visited.any { !it }
        if (split) {
            ans++
        }
    }

    println(ans)
}

fun main(args: Array<String>) {
    c75(readLineList())
}

fun readLineList(): Array<String> {
    val lineList = mutableListOf<String>()
    while (true) {
        val line = readLine()
        if (line.isNullOrBlank()) {
            break
        } else {
            lineList.add(line!!)
        }
    }
    return lineList.toTypedArray()
}