import std.stdio, std.string, std.conv, std.bigint, std.typecons, std.algorithm, std.array, std.math, std.range;
 
void main() {
    auto tmp = readln.split.to!(int[]);
    auto N = tmp[0], M = tmp[1];
    int[][] edges;
    int[][] connection;
    connection.length = N;
    foreach (i; 0..M) {
        tmp = readln.split.to!(int[]);
        edges ~= [tmp[0]-1, tmp[1]-1];
        connection[tmp[0]-1] ~= tmp[1]-1;
        connection[tmp[1]-1] ~= tmp[0]-1;
    }
    edges.filter!((excludedEdge) {
        auto vertex = [0];
        while (vertex.length < N) {
            auto bcnt = vertex.length;
            foreach (v; vertex) {
                foreach (next; connection[v]) {
                    if (v == excludedEdge[0] && next == excludedEdge[1]) continue;
                    if (v == excludedEdge[1] && next == excludedEdge[0]) continue;
                    if (vertex.canFind(next)) continue;
                    vertex ~= next;
                }
            }
            if (bcnt == vertex.length) {
                return true;
            }
        }
        return false;
    }).array.length.writeln;
}