import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.random;
import std.typecons;
import std.container;

alias sread = () => readln.chomp();
ulong MOD = 1_000_000_007;
ulong INF = 1_000_000_000_000;
alias Side = Tuple!(long, "from", long, "to");

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}

long n, m;
long[][] graph;

void main()
{
    scan(n, m);
    auto g = new long[][](n, 0);
    auto sides = new Side[](m);
    foreach (i; iota(m))
    {
        long a, b;
        scan(a, b);
        g[a - 1] ~= [b - 1];
        g[b - 1] ~= [a - 1];
        sides[i] = Side(a - 1, b - 1);
    }
    graph = g;
    long cnt;
    foreach (e; sides)
    {
        auto visited = new long[](n);
        visited[0] = 1;
        dfs(0, 0, e, visited);
        // writeln();
        // visited.writeln();
        if(visited.sum != n)
            cnt++;
    }
    cnt.writeln();
}

void dfs(long vertex, long neighbor, Side invail, long[] visited)
{
    if (neighbor >= graph[vertex].length)
        return;

    auto next = graph[vertex][neighbor];
    if (!visited[next])
    {
        // writef("vertex = %s next = %s ,", vertex + 1, next + 1);
        if(Side(vertex, next) == invail || Side(next, vertex) == invail)
        {
            dfs(vertex, neighbor + 1, invail, visited);
        }
        else
        {
            visited[next] = 1;
            dfs(next, 0, invail, visited);
        }
        dfs(vertex, neighbor + 1, invail, visited);
    }
    else
    {
        dfs(vertex, neighbor + 1, invail, visited);
    }
}
