import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.util.*

class Vertex {
    companion object {
        var disc = 0
    }

    val adj: MutableList<Edge> = mutableListOf()
    var num = -1
    var low = -1
    var visited = false


    fun dfs(from: Vertex?) {
        visited = true
        num = disc
        low = disc
        disc += 1


        for (edge in adj) {
            val v = edge.to
            if (!v.visited && v != from) {
                v.dfs(this)
                low = Math.min(v.low, low)
                if (v.low > num) edge.bridge = true
            }
            else if(v!=from) {
                low = Math.min(low, v.num)
            }
        }
    }
}

class Edge(val to: Vertex) {
    var bridge: Boolean = false
}

val sc = FastScanner(System.`in`)
fun main(args: Array<String>) {
    val n = sc.nextInt()
    val m = sc.nextInt()


    val vs = Array(n) { Vertex() }
    (1..m).forEach {
        val v = vs[sc.nextInt() - 1]
        val u = vs[sc.nextInt() - 1]
        v.adj.add(Edge(u))
        u.adj.add(Edge(v))
    }


    vs[0].dfs(null)


    val count = vs
        .asSequence()
        .flatMap { it.adj.asSequence() }
        .filter { it.bridge }
        .count()


    println(count)

}


class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}


