n, m = list(map(int, input().split()))

li = []

count = 0



def check_dfs(node_list):

    traveled = []

    return dfs(node_list, traveled, 0)





def dfs(node_list, t_list, position):

    t_list.append(position)

    if len(t_list) == n:

        return 0

    for i in node_list[position]:

        if i not in t_list:

            dfs(node_list, t_list, i)

    if len(t_list) == n:

        return 0

    else:

        return 1



for i in range(m):

    array = list(map(int, input().split()))

    li.append(array)



for i in range(m):

    nodes = [[] for k in range(n)]

    for j in range(m):

        if j == i:

            continue

        else:

            nodes[li[j][0]-1].append(li[j][1]-1)

            nodes[li[j][1]-1].append(li[j][0]-1)

    count += check_dfs(nodes)



print(count)
import sys

sys.setrecursionlimit(10**5)



n, m = list(map(int, input().split()))

graph = [[] for _ in range(n)]

edge = []



for _ in range(m):

    a, b = list(map(int, input().split()))

    a -= 1

    b -= 1

    graph[a].append(b)

    graph[b].append(a)

    edge.append([a, b])



cnt = 0





def dfs(start, a, b, explored, n):

    for node in graph[start]:

        if node not in explored:

            if (start, node) == (a, b) or (start, node) == (b, a):

                continue

            else:

                explored.append(node)

                dfs(node, a, b, explored, n)

    if len(explored) == n:

        return 0

    else:

        return 1

x = 0

for i, j in edge:

    x += dfs(0, i, j, [], n)





print(x)
n, m = list(map(int, input().split()))
li = []
count = 0


def check_dfs(node_list):
    traveled = []
    return dfs(node_list, traveled, 0)


def dfs(node_list, t_list, position):
    t_list.append(position)
    if len(t_list) == n:
        return 0
    for i in node_list[position]:
        if i not in t_list:
            dfs(node_list, t_list, i)
    if len(t_list) == n:
        return 0
    else:
        return 1


for i in range(m):
    array = list(map(int, input().split()))
    li.append(array)
for i in range(m):
    nodes = [[] for k in range(n)]
    for j in range(m):
        if j == i:
            continue
        else:
            nodes[li[j][0] - 1].append(li[j][1] - 1)
            nodes[li[j][1] - 1].append(li[j][0] - 1)
    count += check_dfs(nodes)
print(count)

import sys

sys.setrecursionlimit(10**5)
n, m = list(map(int, input().split()))
graph = [[] for _ in range(n)]
edge = []
for _ in range(m):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    graph[a].append(b)
    graph[b].append(a)
    edge.append([a, b])
cnt = 0


def dfs(start, a, b, explored, n):
    for node in graph[start]:
        if node not in explored:
            if (start, node) == (a, b) or (start, node) == (b, a):
                continue
            else:
                explored.append(node)
                dfs(node, a, b, explored, n)
    if len(explored) == n:
        return 0
    else:
        return 1


x = 0
for i, j in edge:
    x += dfs(0, i, j, [], n)
print(x)

+import sys + +sys.setrecursionlimit(10**5) -li = [] -count = 0 +graph = [[] for _ in range(n)] +edge = [] +for _ in range(m): +    a, b = list(map(int, input().split())) +    a -= 1 +    b -= 1 +    graph[a].append(b) +    graph[b].append(a) +    edge.append([a, b]) +cnt = 0 -def check_dfs(node_list): -    traveled = [] -    return dfs(node_list, traveled, 0) - - -def dfs(node_list, t_list, position): -    t_list.append(position) -    if len(t_list) == n: -        return 0 -    for i in node_list[position]: -        if i not in t_list: -            dfs(node_list, t_list, i) -    if len(t_list) == n: +def dfs(start, a, b, explored, n): +    for node in graph[start]: +        if node not in explored: +            if (start, node) == (a, b) or (start, node) == (b, a): +                continue +            else: +                explored.append(node) +                dfs(node, a, b, explored, n) +    if len(explored) == n: -for i in range(m): -    array = list(map(int, input().split())) -    li.append(array) -for i in range(m): -    nodes = [[] for k in range(n)] -    for j in range(m): -        if j == i: -            continue -        else: -            nodes[li[j][0] - 1].append(li[j][1] - 1) -            nodes[li[j][1] - 1].append(li[j][0] - 1) -    count += check_dfs(nodes) -print(count) +x = 0 +for i, j in edge: +    x += dfs(0, i, j, [], n) +print(x)