process.stdin.resume();
process.stdin.setEncoding('utf8');

var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});

process.stdin.on('end', function() {
    Main(g_input.split(/\r?\n/));
});

function Main(input) {

    var size = input[0].split(' ');
    var n = parseInt(size[0], 10);
    var m = parseInt(size[1], 10);
    var a = new Array(m);
    var b = new Array(m);
    var graph = new Array(n);
    for (var i = 0; i < n; i++) {
        graph[i] = new Array(n);
        for (var j = 0; j < n; j++) {
            graph[i][j] = false;
        }
    }
    for (var i = 0; i < m; i++) {
        var link = input[i + 1].split(' ');
        a[i] = parseInt(link[0], 10);
        b[i] = parseInt(link[1], 10);
        graph[a[i] - 1][b[i] - 1] = true;
        graph[b[i] - 1][a[i] - 1] = true;
    }

    var bridge = 0;
    for (var i = 0; i < m; i++) {
        graph[a[i] - 1][b[i] - 1] = false;
        graph[b[i] - 1][a[i] - 1] = false;

        var visited = new Array(n);
        for (var j = 0; j < n; j++) {
            visited[j] = false;
        }

        dfs(1, graph, visited);
        for (var j = 0; j < n; j++) {
            if (!visited[j]) {
                bridge++;
                break;
            }
        }

        graph[a[i] - 1][b[i] - 1] = true;
        graph[b[i] - 1][a[i] - 1] = true;
    }

    console.log(bridge);

    return 0;
}

function dfs(pos, graph, visited) {
    visited[pos - 1] = true;

    for (var i = 0; i < graph.length; i++) {
        if (visited[i]) {
            continue;
        }
        if (graph[pos - 1][i]) {
            dfs(i + 1, graph, visited);
        }
    }
}
