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

ab = [list(map(int, input().split())) for _ in range(m)]



def bfs(i, edges, r):

    if all(r):

        return True

    if r[i]:

        return False

    r[i] = True

    if any([bfs(e, edges, r) for e in edges[i]]):

        return True

    return False



ans = 0

for i in range(m):

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

    for j in range(m):

        if i != j:

            edges[ab[j][0]-1].append(ab[j][1]-1)

            edges[ab[j][1]-1].append(ab[j][0]-1)

    reached = [False for _ in range(n)]

    if not bfs(0, edges, reached):

        ans += 1

print(ans)
def dfs(i,edge):

    if vis[i]==True:

        return

    vis[i]=True

    for j in edge[i]:

        dfs(j,edge)



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

ab=[[0,0] for _ in range(M)]

for i in range(M):

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

    ab[i][0],ab[i][1]=a,b

ans=0

for i in range(M):

    edge=[[] for _ in range(N+1)]

    for j in range(M):

        if j!=i:

            edge[ab[j][0]].append(ab[j][1])

            edge[ab[j][1]].append(ab[j][0])

    vis=[False]*(N+1)

    vis[0]=True

    dfs(1,edge)

    if False in vis:

        ans+=1

print(ans)
n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]


def bfs(i, edges, r):
    if all(r):
        return True
    if r[i]:
        return False
    r[i] = True
    if any([bfs(e, edges, r) for e in edges[i]]):
        return True
    return False


ans = 0
for i in range(m):
    edges = [[] for _ in range(n)]
    for j in range(m):
        if i != j:
            edges[ab[j][0] - 1].append(ab[j][1] - 1)
            edges[ab[j][1] - 1].append(ab[j][0] - 1)
    reached = [False for _ in range(n)]
    if not bfs(0, edges, reached):
        ans += 1
print(ans)

def dfs(i, edge):
    if vis[i] == True:
        return
    vis[i] = True
    for j in edge[i]:
        dfs(j, edge)


N, M = list(map(int, input().split()))
ab = [[0, 0] for _ in range(M)]
for i in range(M):
    a, b = list(map(int, input().split()))
    ab[i][0], ab[i][1] = a, b
ans = 0
for i in range(M):
    edge = [[] for _ in range(N + 1)]
    for j in range(M):
        if j != i:
            edge[ab[j][0]].append(ab[j][1])
            edge[ab[j][1]].append(ab[j][0])
    vis = [False] * (N + 1)
    vis[0] = True
    dfs(1, edge)
    if False in vis:
        ans += 1
print(ans)

-n, m = list(map(int, input().split())) -ab = [list(map(int, input().split())) for _ in range(m)] +def dfs(i, edge): +    if vis[i] == True: +        return +    vis[i] = True +    for j in edge[i]: +        dfs(j, edge) -def bfs(i, edges, r): -    if all(r): -        return True -    if r[i]: -        return False -    r[i] = True -    if any([bfs(e, edges, r) for e in edges[i]]): -        return True -    return False - - +N, M = list(map(int, input().split())) +ab = [[0, 0] for _ in range(M)] +for i in range(M): +    a, b = list(map(int, input().split())) +    ab[i][0], ab[i][1] = a, b -for i in range(m): -    edges = [[] for _ in range(n)] -    for j in range(m): -        if i != j: -            edges[ab[j][0] - 1].append(ab[j][1] - 1) -            edges[ab[j][1] - 1].append(ab[j][0] - 1) -    reached = [False for _ in range(n)] -    if not bfs(0, edges, reached): +for i in range(M): +    edge = [[] for _ in range(N + 1)] +    for j in range(M): +        if j != i: +            edge[ab[j][0]].append(ab[j][1]) +            edge[ab[j][1]].append(ab[j][0]) +    vis = [False] * (N + 1) +    vis[0] = True +    dfs(1, edge) +    if False in vis: