import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.array;

int N, M;
int[] a, b;
bool[] data;
int[][] e;
int[] memo;
int ans;

void Func(int n, int b){
    memo ~= n;
    foreach(i ; e[n]){
        bool check = false;
        if(i == b) continue;
        foreach(j ; memo){
            if(i == j){
                check = true;
            }
            if(check){
                data[j] = true;
            }
        }
        if(!check){
            Func(i, n);
        }
    }
    memo.popBack();
}

void main()
{
    auto input = readln.chomp.split.to!(int[]);
    N = input[0];
    M = input[1];

    a = new int[M];
    b = new int[M];
    data = new bool[N];
    e = new int[][N];
    foreach(i ; 0..M){
        auto input2 = readln.chomp.split.to!(int[]);
        a[i] = input2[0];
        b[i] = input2[1];
        --a[i], --b[i];
        e[a[i]] ~= b[i];
        e[b[i]] ~= a[i];
    }

    Func(0, 0);
    foreach(i; 0..M){
        if(!data[a[i]] || !data[b[i]]){
            ++ans;
        }
    }
    ans.writeln;
}