

N,M = [int(i) for i in input().split()]

Nodes = []

Mlist = []

count = 0

for i in range(N):

    Mlist.append(1)

for i in range(M):

    Nodes.append(list(map(int, input().split())))





def search(x):

    Mlist2[x-1] = 0

    answer = 1

    for i in range(len(Nodes2)):

        if x in Nodes2[i]:

            if Nodes2[i].index(x) == 0:

                if Mlist2[Nodes2[i][1]-1] != 0:

                    search(Nodes2[i][1])

                else: continue

            if Nodes2[i].index(x) == 1:

                if Mlist2[Nodes2[i][0]-1] != 0:

                    search(Nodes2[i][0])

                else: continue

        else: continue

    #print(Mlist2)

    for i in range(len(Mlist2)):

        if Mlist2[i] == 0:

            continue

        else:

            answer = 0

            break

    if answer == 1:

        return 1

    if answer == 0:

        return 0



for i in range(M):

    #print (i)

    Nodes2 = Nodes[:]

    Mlist2 = Mlist[:]

    del Nodes2[i]

    ans = search(1)

    if ans == 0:

        count += 1

print(count)





N,M = [int(i) for i in input().split()]

Nodes = []

Mlist = []

count = 0

for i in range(N):

    Mlist.append(1)

for i in range(M):

    Nodes.append(list(map(int, input().split())))





def search(x):

    Mlist2[x-1] = 0

    for i in range(len(Nodes2)):

        if x in Nodes2[i]:

            if Nodes2[i].index(x) == 0:

                if Mlist2[Nodes2[i][1]-1] != 0:

                    search(Nodes2[i][1])

                else: continue

            if Nodes2[i].index(x) == 1:

                if Mlist2[Nodes2[i][0]-1] != 0:

                    search(Nodes2[i][0])

                else: continue

        else: continue

    #print(Mlist2)

    return(Mlist2)



def cout(x):

    answer = 1

    for i in range(len(x)):

        if x[i] == 0:

            continue

        else:

            answer = 0

            break

    if answer == 1:

        return 1

    if answer == 0:

        return 0



for i in range(M):

    #print (i)

    Nodes2 = Nodes[:]

    Mlist2 = Mlist[:]

    del Nodes2[i]

    ans = cout(search(1))

    if ans == 0:

        count += 1

print(count)



N, M = [int(i) for i in input().split()]
Nodes = []
Mlist = []
count = 0
for i in range(N):
    Mlist.append(1)
for i in range(M):
    Nodes.append(list(map(int, input().split())))


def search(x):
    Mlist2[x - 1] = 0
    answer = 1
    for i in range(len(Nodes2)):
        if x in Nodes2[i]:
            if Nodes2[i].index(x) == 0:
                if Mlist2[Nodes2[i][1] - 1] != 0:
                    search(Nodes2[i][1])
                else:
                    continue
            if Nodes2[i].index(x) == 1:
                if Mlist2[Nodes2[i][0] - 1] != 0:
                    search(Nodes2[i][0])
                else:
                    continue
        else:
            continue
    # print(Mlist2)
    for i in range(len(Mlist2)):
        if Mlist2[i] == 0:
            continue
        else:
            answer = 0
            break
    if answer == 1:
        return 1
    if answer == 0:
        return 0


for i in range(M):
    # print (i)
    Nodes2 = Nodes[:]
    Mlist2 = Mlist[:]
    del Nodes2[i]
    ans = search(1)
    if ans == 0:
        count += 1
print(count)

N, M = [int(i) for i in input().split()]
Nodes = []
Mlist = []
count = 0
for i in range(N):
    Mlist.append(1)
for i in range(M):
    Nodes.append(list(map(int, input().split())))


def search(x):
    Mlist2[x - 1] = 0
    for i in range(len(Nodes2)):
        if x in Nodes2[i]:
            if Nodes2[i].index(x) == 0:
                if Mlist2[Nodes2[i][1] - 1] != 0:
                    search(Nodes2[i][1])
                else:
                    continue
            if Nodes2[i].index(x) == 1:
                if Mlist2[Nodes2[i][0] - 1] != 0:
                    search(Nodes2[i][0])
                else:
                    continue
        else:
            continue
    # print(Mlist2)
    return Mlist2


def cout(x):
    answer = 1
    for i in range(len(x)):
        if x[i] == 0:
            continue
        else:
            answer = 0
            break
    if answer == 1:
        return 1
    if answer == 0:
        return 0


for i in range(M):
    # print (i)
    Nodes2 = Nodes[:]
    Mlist2 = Mlist[:]
    del Nodes2[i]
    ans = cout(search(1))
    if ans == 0:
        count += 1
print(count)

-    answer = 1 -    for i in range(len(Mlist2)): -        if Mlist2[i] == 0: +    return Mlist2 + + +def cout(x): +    answer = 1 +    for i in range(len(x)): +        if x[i] == 0: -    ans = search(1) +    ans = cout(search(1))