import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

int readint() {
    return readln.chomp.to!int;
}

int[] readints() {
    return readln.split.map!(to!int).array;
}

int calc(int n, bool[][] adj) {

    bool isBridge() {
        auto uf = new UnionFind(n);
        int[] nodes = [0];
        bool[int] used;
        while (nodes.length > 0) {
            int node = nodes[0];
            nodes = nodes[1 .. $];

            if (node in used)
                continue;
            used[node] = true;

            for (int i = 0; i < n; i++) {
                if (adj[node][i]) {
                    uf.unite(node, i);
                    nodes ~= i;
                }
            }
        }

        for (int i = 1; i < n; i++) {
            if (!uf.isSame(0, i)) {
                return true;
            }
        }
        return false;
    }

    int ans = 0;
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            if (adj[i][j]) {
                adj[i][j] = adj[j][i] = false;
                ans += isBridge();
                adj[i][j] = adj[j][i] = true;
            }
        }
    }
    return ans;
}

void main() {
    auto nm = readints;
    int n = nm[0], m = nm[1];

    auto adj = new bool[][](n, n);
    for (int i = 0; i < m; i++) {
        auto ab = readints;
        int a = ab[0] - 1, b = ab[1] - 1;

        adj[a][b] = adj[b][a] = true;
    }

    writeln(calc(n, adj));
}

class UnionFind {
    private int[] _data;

    this(int n) {
        _data = new int[](n + 1);
        _data[] = -1;
    }

    int root(int a) {
        if (_data[a] < 0)
            return a;
        return _data[a] = root(_data[a]);
    }

    bool unite(int a, int b) {
        int rootA = root(a);
        int rootB = root(b);
        if (rootA == rootB)
            return false;
        _data[rootA] += _data[rootB];
        _data[rootB] = rootA;
        return true;
    }

    bool isSame(int a, int b) {
        return root(a) == root(b);
    }

    int size(int a) {
        return -_data[root(a)];
    }
}
