using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Math;
using static System.Console;


class Program
{
    public class Graph
    {
        public class Node
        {
            public List<int> Children = new List<int>();
        }

        public Graph(int nodeNumber)
        {
            Nodes = new Node[nodeNumber];
            for (int i = 0; i < Nodes.Length; i++)
            {
                Nodes[i] = new Node();
                //Connenters = new List<int>();
            }
        }

        /// <summary>
        /// 頂点の配列。それぞれの頂点には、一つの親と、複数の子がある
        /// </summary>
        public Node[] Nodes { get; }

        //public List<int> Connenters { get; }

        public void Connent(int to, int from, int id = -1)
        {
            //Connenters.Add(new int[3] { to, from, 0 });
            Nodes[to].Children.Add(from);
            Nodes[from].Children.Add(to);
        }
    }

    static void Main()
    {
        int[] NM = ReadIntN();
        int N = NM[0];
        int M = NM[1];
        Graph tree = new Graph(N);
        List<int[]> connecters = new List<int[]>();

        for (int i = 0; i < M; i++)
        {
            int[] ab = ReadIntN();
            tree.Connent(ab[0] - 1, ab[1] - 1);
            connecters.Add(new int[2] {ab[0]-1,ab[1]-1 });
        }

        int ans = 0;
        foreach (var unabled in connecters)//50
        {
            Queue<int> queue = new Queue<int>();
            bool[] done = new bool[N];
            int count = 0;

            queue.Enqueue(0);
            done[0] = true;
            count++;
            while (queue.Count>0)//50
            {
                int nodeIndex = queue.Dequeue();
                Graph.Node node = tree.Nodes[nodeIndex];
                foreach (var next in node.Children)//50
                {
                    if (!done[next])
                    {
                        if (!(unabled[0] == nodeIndex && unabled[1] == next) && !(unabled[1] == nodeIndex && unabled[0] == next))
                        {
                            queue.Enqueue(next);
                            done[next] = true;
                            count++;
                        }
                    }
                }
            }

            if (count != N) ans++;
        }


        WriteLine(ans);
        ReadLine();
        return;
    }




    #region Reader
    static string ReadStr()
    {
        return Console.ReadLine();
    }
    static string[] ReadStrN()
    {
        return Console.ReadLine().Split(' ');
    }
    static int ReadInt()
    {
        return Convert.ToInt32(Console.ReadLine());
    }
    static int[] ReadIntN()
    {
        return Console.ReadLine().Split(' ').Select(s => Convert.ToInt32(s)).ToArray();
    }
    static long ReadLong()
    {
        return Convert.ToInt64(Console.ReadLine());
    }
    static long[] ReadLongN()
    {
        return Console.ReadLine().Split(' ').Select(s => Convert.ToInt64(s)).ToArray();
    }
    static long[,] ReadLongMatrix(int r, int c)
    {
        var mat = new long[r, c];
        for (int i = 0; i < r; ++i)
        {
            var x = ReadLongN();
            for (int j = 0; j < c; ++j)
            {
                mat[i, j] = x[j];
            }
        }
        return mat;
    }
    static Tuple<string, string>[] ReadTupleStr(int n)
    {
        List<Tuple<string, string>> list = new List<Tuple<string, string>>();
        for (int i = 0; i < n; ++i)
        {
            var ab = ReadStrN();
            list.Add(new Tuple<string, string>(ab[0], ab[1]));
        }
        return list.ToArray();
    }
    static Tuple<long, long>[] ReadTupleLong(int n)
    {
        List<Tuple<long, long>> list = new List<Tuple<long, long>>();
        for (int i = 0; i < n; ++i)
        {
            var ab = ReadLongN();
            list.Add(new Tuple<long, long>(ab[0], ab[1]));
        }
        return list.ToArray();
    }
    static Tuple<int, int>[] ReadTupleInt(int n)
    {
        List<Tuple<int, int>> list = new List<Tuple<int, int>>();
        for (int i = 0; i < n; ++i)
        {
            var ab = ReadIntN();
            list.Add(new Tuple<int, int>(ab[0], ab[1]));
        }
        return list.ToArray();
    }
    static Tuple<double, double>[] ReadTupleDouble(int n)
    {
        List<Tuple<double, double>> list = new List<Tuple<double, double>>();
        for (int i = 0; i < n; ++i)
        {
            var ab = ReadLongN();
            list.Add(new Tuple<double, double>(ab[0], ab[1]));
        }
        return list.ToArray();
    }
    static Dictionary<int, HashSet<int>> ReadAdjacencyList(int N, int M)
    {
        Dictionary<int, HashSet<int>> dict = new Dictionary<int, HashSet<int>>();
        for (int i = 0; i <= N; ++i)
        {
            dict.Add(i, new HashSet<int>());
        }
        for (int i = 0; i < M; ++i)
        {
            var ab = ReadIntN();
            dict[ab[0]].Add(ab[1]);
            dict[ab[1]].Add(ab[0]);
        }
        return dict;
    }
    #endregion

}

Measured memory_bytes: 13652