import std.stdio, std.string, std.conv, std.algorithm;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;

immutable mod = 10^^9 + 7;

void main() {
    int n, m;
    scan(n, m);

    auto adj = new bool[][](n, n);

    foreach (i ; 0 .. m) {
        int ai, bi;
        scan(ai, bi);
        ai--; bi--;
        adj[ai][bi] = adj[bi][ai] = 1;
    }

    int ans;

    void dfs(bool[] visited, int node) {
        visited[node] = 1;

        foreach (i ; 0 .. n) {
            if (adj[node][i] && !visited[i]) {
                dfs(visited, i);
            }
        }
    }

    foreach (i ; 0 .. n) {
        foreach (j ; i + 1 .. n) {
            if (adj[i][j]) {
                adj[i][j] = adj[j][i] = 0;

                auto visited = new bool[](n);

                dfs(visited, 0);

                ans += !all(visited);
                adj[i][j] = adj[j][i] = 1;
            }
        }
    }

    writeln(ans);
}



void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}