icase=0

if icase==0:

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

    a=[]

    b=[]

    for i in range(m):

        ai,bi=list(map(int, input().split()))

        a.append(ai)

        b.append(bi)

elif icase==1:

    n=6

    m=5

#    a=[[1],[2],[3],[4],[5]]

#    b=[[2],[3],[4],[5],[6]]

    a=[1,2,3,4,5]

    b=[2,3,4,5,6]

elif icase==2:

    n=7

    m=7

    a=[1,2,3,4,4,5,6]

    b=[3,7,4,5,6,6,7]



    

vtx=[]

for i in range(n):

    vtx.append([i+1])

icnt=0



for j in range(m):    

    vtx1=vtx.copy()

    a1=a.copy()

    b1=b.copy()

    del a1[j]

    del b1[j]

    

    for i in range(m-1):

        for v1 in vtx1:

            if a1[i] in v1:

                if not b1[i] in v1:

                    for v2 in vtx1:

                        if v1!=v2:

                            if b1[i] in v2:

                                break

                    vtx1.remove(v1)

                    vtx1.remove(v2)

                    v3=v1+v2

                    vtx1.append(v3)

#        print(a[i],b[i],len(vtx1),vtx1)

#    print(len(vtx1),vtx1)

    if len(vtx1)!=1:

        icnt=icnt+1

print(icnt)        
limit=50

graph=[[False]*limit for i in range(limit)]

visited=[]*limit



def dfs(v,n,graph,visited):

    visited[v]=True

    for v2 in range(n):

        if graph[v][v2]==False:

            continue

        if visited[v2]==True:

            continue

        dfs(v2,n,graph,visited)



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

a=[0]*m

b=[0]*m

for i in range(m):

    ai,bi=list(map(int,input().split()))

    a[i]=ai-1

    b[i]=bi-1

    graph[a[i]][b[i]]=True

    graph[b[i]][a[i]]=True

    

ans=0 

for i in range(m):

    graph[a[i]][b[i]]=False

    graph[b[i]][a[i]]=False

    visited=[False]*n

    dfs(0,n,graph,visited)

    bridge=False

    for j in range(n):

        if visited[j]==False:

            bridge=True

    if bridge:

        ans+=1

    graph[a[i]][b[i]]=True

    graph[b[i]][a[i]]=True

    

print(ans)
icase = 0
if icase == 0:
    n, m = list(map(int, input().split()))
    a = []
    b = []
    for i in range(m):
        ai, bi = list(map(int, input().split()))
        a.append(ai)
        b.append(bi)
elif icase == 1:
    n = 6
    m = 5
    #    a=[[1],[2],[3],[4],[5]]
    #    b=[[2],[3],[4],[5],[6]]
    a = [1, 2, 3, 4, 5]
    b = [2, 3, 4, 5, 6]
elif icase == 2:
    n = 7
    m = 7
    a = [1, 2, 3, 4, 4, 5, 6]
    b = [3, 7, 4, 5, 6, 6, 7]
vtx = []
for i in range(n):
    vtx.append([i + 1])
icnt = 0
for j in range(m):
    vtx1 = vtx.copy()
    a1 = a.copy()
    b1 = b.copy()
    del a1[j]
    del b1[j]
    for i in range(m - 1):
        for v1 in vtx1:
            if a1[i] in v1:
                if not b1[i] in v1:
                    for v2 in vtx1:
                        if v1 != v2:
                            if b1[i] in v2:
                                break
                    vtx1.remove(v1)
                    vtx1.remove(v2)
                    v3 = v1 + v2
                    vtx1.append(v3)
    #        print(a[i],b[i],len(vtx1),vtx1)
    #    print(len(vtx1),vtx1)
    if len(vtx1) != 1:
        icnt = icnt + 1
print(icnt)

limit = 50
graph = [[False] * limit for i in range(limit)]
visited = [] * limit


def dfs(v, n, graph, visited):
    visited[v] = True
    for v2 in range(n):
        if graph[v][v2] == False:
            continue
        if visited[v2] == True:
            continue
        dfs(v2, n, graph, visited)


n, m = list(map(int, input().split()))
a = [0] * m
b = [0] * m
for i in range(m):
    ai, bi = list(map(int, input().split()))
    a[i] = ai - 1
    b[i] = bi - 1
    graph[a[i]][b[i]] = True
    graph[b[i]][a[i]] = True
ans = 0
for i in range(m):
    graph[a[i]][b[i]] = False
    graph[b[i]][a[i]] = False
    visited = [False] * n
    dfs(0, n, graph, visited)
    bridge = False
    for j in range(n):
        if visited[j] == False:
            bridge = True
    if bridge:
        ans += 1
    graph[a[i]][b[i]] = True
    graph[b[i]][a[i]] = True
print(ans)

-icase = 0 -if icase == 0: -    n, m = list(map(int, input().split())) -    a = [] -    b = [] -    for i in range(m): -        ai, bi = list(map(int, input().split())) -        a.append(ai) -        b.append(bi) -elif icase == 1: -    n = 6 -    m = 5 -    #    a=[[1],[2],[3],[4],[5]] -    #    b=[[2],[3],[4],[5],[6]] -    a = [1, 2, 3, 4, 5] -    b = [2, 3, 4, 5, 6] -elif icase == 2: -    n = 7 -    m = 7 -    a = [1, 2, 3, 4, 4, 5, 6] -    b = [3, 7, 4, 5, 6, 6, 7] -vtx = [] -for i in range(n): -    vtx.append([i + 1]) -icnt = 0 -for j in range(m): -    vtx1 = vtx.copy() -    a1 = a.copy() -    b1 = b.copy() -    del a1[j] -    del b1[j] -    for i in range(m - 1): -        for v1 in vtx1: -            if a1[i] in v1: -                if not b1[i] in v1: -                    for v2 in vtx1: -                        if v1 != v2: -                            if b1[i] in v2: -                                break -                    vtx1.remove(v1) -                    vtx1.remove(v2) -                    v3 = v1 + v2 -                    vtx1.append(v3) -    #        print(a[i],b[i],len(vtx1),vtx1) -    #    print(len(vtx1),vtx1) -    if len(vtx1) != 1: -        icnt = icnt + 1 -print(icnt) +limit = 50 +graph = [[False] * limit for i in range(limit)] +visited = [] * limit + + +def dfs(v, n, graph, visited): +    visited[v] = True +    for v2 in range(n): +        if graph[v][v2] == False: +            continue +        if visited[v2] == True: +            continue +        dfs(v2, n, graph, visited) + + +n, m = list(map(int, input().split())) +a = [0] * m +b = [0] * m +for i in range(m): +    ai, bi = list(map(int, input().split())) +    a[i] = ai - 1 +    b[i] = bi - 1 +    graph[a[i]][b[i]] = True +    graph[b[i]][a[i]] = True +ans = 0 +for i in range(m): +    graph[a[i]][b[i]] = False +    graph[b[i]][a[i]] = False +    visited = [False] * n +    dfs(0, n, graph, visited) +    bridge = False +    for j in range(n): +        if visited[j] == False: +            bridge = True +    if bridge: +        ans += 1 +    graph[a[i]][b[i]] = True +    graph[b[i]][a[i]] = True +print(ans)