N , M = list(map(int, input().split()))

AB = [list(map(int,input().split())) for i in range(M)]





def DFS(table):

    visited = [1]

    que = [1]

    

    while que != []:

        now = que[0]

        del que[0]

        

        for index, e in enumerate(table[now]):

            if (e == 1) & (index not in visited):

                visited.append(index)

                que.append(index)

        

    if len(visited) == N:

        return 0

    else:

        return 1



ans = 0

for i in range(M):

    graph = AB.copy()

    del graph[i]

    

    table = [[0]*(N+1) for i in range(N+1)]

    for a,b in graph:

        table[a][b] = 1

        table[b][a] = 1



    ans += DFS(table)



print(ans)

    
N, M = list(map(int, input().split()))

AB = [list(map(int, input().split())) for i in range(M)]





class UnionFind:

    def __init__(self, n):

        self.par = [i for i in range(n+1)]

        self.rank = [0] * (n+1)

        self.size = [1] * (n+1)



    # 検索

    def find(self, x):

        if self.par[x] == x:

            return x

        else:

            self.par[x] = self.find(self.par[x])

            return self.par[x]



    # 併合

    def union(self, x, y):

        x = self.find(x)

        y = self.find(y)



        if x == y:

            return



        if self.rank[x] < self.rank[y]:

            self.par[x] = y

            self.size[y] += self.size[x]

            self.size[x] = 0

        else:

            self.par[y] = x

            self.size[x] += self.size[y]

            self.size[y] = 0

            if self.rank[x] == self.rank[y]:

                self.rank[x] += 1



    # 同じ集合に属するか判定

    def same_check(self, x, y):

        return self.find(x) == self.find(y)





ans = 0

for i in range(M):

    uf = UnionFind(N)

    for j in range(M):

        if j == i:

            continue

        uf.union(AB[j][0], AB[j][1])

    for k in range(N):

        uf.find(k+1)

    if len(set(uf.par)) != 2:

        ans += 1



print(ans)



N, M = list(map(int, input().split()))
AB = [list(map(int, input().split())) for i in range(M)]


def DFS(table):
    visited = [1]
    que = [1]
    while que != []:
        now = que[0]
        del que[0]
        for index, e in enumerate(table[now]):
            if (e == 1) & (index not in visited):
                visited.append(index)
                que.append(index)
    if len(visited) == N:
        return 0
    else:
        return 1


ans = 0
for i in range(M):
    graph = AB.copy()
    del graph[i]
    table = [[0] * (N + 1) for i in range(N + 1)]
    for a, b in graph:
        table[a][b] = 1
        table[b][a] = 1
    ans += DFS(table)
print(ans)

N, M = list(map(int, input().split()))
AB = [list(map(int, input().split())) for i in range(M)]


class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n + 1)]
        self.rank = [0] * (n + 1)
        self.size = [1] * (n + 1)

    # 検索
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    # 併合
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
            self.size[y] += self.size[x]
            self.size[x] = 0
        else:
            self.par[y] = x
            self.size[x] += self.size[y]
            self.size[y] = 0
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    # 同じ集合に属するか判定
    def same_check(self, x, y):
        return self.find(x) == self.find(y)


ans = 0
for i in range(M):
    uf = UnionFind(N)
    for j in range(M):
        if j == i:
            continue
        uf.union(AB[j][0], AB[j][1])
    for k in range(N):
        uf.find(k + 1)
    if len(set(uf.par)) != 2:
        ans += 1
print(ans)

-def DFS(table): -    visited = [1] -    que = [1] -    while que != []: -        now = que[0] -        del que[0] -        for index, e in enumerate(table[now]): -            if (e == 1) & (index not in visited): -                visited.append(index) -                que.append(index) -    if len(visited) == N: -        return 0 -    else: -        return 1 +class UnionFind: +    def __init__(self, n): +        self.par = [i for i in range(n + 1)] +        self.rank = [0] * (n + 1) +        self.size = [1] * (n + 1) + +    # 検索 +    def find(self, x): +        if self.par[x] == x: +            return x +        else: +            self.par[x] = self.find(self.par[x]) +            return self.par[x] + +    # 併合 +    def union(self, x, y): +        x = self.find(x) +        y = self.find(y) +        if x == y: +            return +        if self.rank[x] < self.rank[y]: +            self.par[x] = y +            self.size[y] += self.size[x] +            self.size[x] = 0 +        else: +            self.par[y] = x +            self.size[x] += self.size[y] +            self.size[y] = 0 +            if self.rank[x] == self.rank[y]: +                self.rank[x] += 1 + +    # 同じ集合に属するか判定 +    def same_check(self, x, y): +        return self.find(x) == self.find(y) -    graph = AB.copy() -    del graph[i] -    table = [[0] * (N + 1) for i in range(N + 1)] -    for a, b in graph: -        table[a][b] = 1 -        table[b][a] = 1 -    ans += DFS(table) +    uf = UnionFind(N) +    for j in range(M): +        if j == i: +            continue +        uf.union(AB[j][0], AB[j][1]) +    for k in range(N): +        uf.find(k + 1) +    if len(set(uf.par)) != 2: +        ans += 1