object Main extends App {
	val nm = scala.io.StdIn.readLine.split(" ").map(_.toInt)
	var edges = List[(Int,Int)]()

	for(i<-0 until nm(1)){
		val temp = scala.io.StdIn.readLine.split(" ").map(_.toInt)
		edges = (temp(0), temp(1)) :: edges
	}

	def check(t: Int, x: List[(Int,Int)]): Boolean = {
		val a = x.head
		var re = Set(a._1, a._2)
		var te = x.tail

		for(i<- te){
			if(re.contains(i._1) || re.contains(i._2)){
				re = re + i._1 + i._2
			}
		}

		re.size == t
	}

	var answer = 0
	for(x <- edges){
			if(! check(nm(0), edges.filter(_ != x))){
				answer += 1
			}
	}

	println(answer)
}