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

a = [[False]*n for i in range(n)]

hen_m = []

for i in range(m):

    x1, x2 = list(map(int, input().split()))

    x1 -= 1

    x2 -= 1

    hen_m.append([x1, x2])

    a[x1][x2] = True

    a[x2][x1] = True

for i in range(n):

    a[i][i] = True



#ワーシャルフロイド

def warshall(n, c):

    for i in range(n):

        for j in range(n):

            for k in range(n):

                c[j][k] = c[j][k] or (c[j][i] and c[i][k])



ans = 0

# Mの辺を消して、わ～シャルフロイド

for i in range(m):

    b = [i[::] for i in a]

    x1 , x2 = hen_m[i]

    b[x1][x2] = False

    b[x2][x1] = False

    warshall(n, b)

    flag = 0

    for j in range(n - 1):

        for k in range(j + 1,n):

            if not b[j][k]:

                flag = 1

                break

        if flag == 1:

            break

    #print(i, flag)

    ans += flag

print(ans)

class UnionFind():

    def __init__(self, n):

        self.parent = [-1]*n

    def root(self, x):

        if self.parent[x] < 0:

            return x

        else:

            self.parent[x] = self.root(self.parent[x])

            return self.parent[x]

    def union(self, x,y):

        root_x = self.root(x)

        root_y = self.root(y)

        if root_x == root_y:

            return False

        if self.parent[root_x] < self.parent[root_y]:

            self.parent[root_x] += self.parent[root_y]

            self.parent[root_y] = root_x

        else:

            self.parent[root_y] += self.parent[root_x]

            self.parent[root_x] = root_y

        return True



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

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

ans = 0

for i in range(m):

    UF = UnionFind(n)

    use = ab[::]

    use.pop(i)

    for a, b in use:

        UF.union(a-1, b-1)

    if sum([j<0 for j in UF.parent]) -1:

        ans += 1

print(ans)

n, m = list(map(int, input().split()))
a = [[False] * n for i in range(n)]
hen_m = []
for i in range(m):
    x1, x2 = list(map(int, input().split()))
    x1 -= 1
    x2 -= 1
    hen_m.append([x1, x2])
    a[x1][x2] = True
    a[x2][x1] = True
for i in range(n):
    a[i][i] = True
# ワーシャルフロイド
def warshall(n, c):
    for i in range(n):
        for j in range(n):
            for k in range(n):
                c[j][k] = c[j][k] or (c[j][i] and c[i][k])


ans = 0
# Mの辺を消して、わ～シャルフロイド
for i in range(m):
    b = [i[::] for i in a]
    x1, x2 = hen_m[i]
    b[x1][x2] = False
    b[x2][x1] = False
    warshall(n, b)
    flag = 0
    for j in range(n - 1):
        for k in range(j + 1, n):
            if not b[j][k]:
                flag = 1
                break
        if flag == 1:
            break
    # print(i, flag)
    ans += flag
print(ans)

class UnionFind:
    def __init__(self, n):
        self.parent = [-1] * n

    def root(self, x):
        if self.parent[x] < 0:
            return x
        else:
            self.parent[x] = self.root(self.parent[x])
            return self.parent[x]

    def union(self, x, y):
        root_x = self.root(x)
        root_y = self.root(y)
        if root_x == root_y:
            return False
        if self.parent[root_x] < self.parent[root_y]:
            self.parent[root_x] += self.parent[root_y]
            self.parent[root_y] = root_x
        else:
            self.parent[root_y] += self.parent[root_x]
            self.parent[root_x] = root_y
        return True


n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(m)]
ans = 0
for i in range(m):
    UF = UnionFind(n)
    use = ab[::]
    use.pop(i)
    for a, b in use:
        UF.union(a - 1, b - 1)
    if sum([j < 0 for j in UF.parent]) - 1:
        ans += 1
print(ans)

-n, m = list(map(int, input().split())) -a = [[False] * n for i in range(n)] -hen_m = [] -for i in range(m): -    x1, x2 = list(map(int, input().split())) -    x1 -= 1 -    x2 -= 1 -    hen_m.append([x1, x2]) -    a[x1][x2] = True -    a[x2][x1] = True -for i in range(n): -    a[i][i] = True -# ワーシャルフロイド -def warshall(n, c): -    for i in range(n): -        for j in range(n): -            for k in range(n): -                c[j][k] = c[j][k] or (c[j][i] and c[i][k]) +class UnionFind: +    def __init__(self, n): +        self.parent = [-1] * n + +    def root(self, x): +        if self.parent[x] < 0: +            return x +        else: +            self.parent[x] = self.root(self.parent[x]) +            return self.parent[x] + +    def union(self, x, y): +        root_x = self.root(x) +        root_y = self.root(y) +        if root_x == root_y: +            return False +        if self.parent[root_x] < self.parent[root_y]: +            self.parent[root_x] += self.parent[root_y] +            self.parent[root_y] = root_x +        else: +            self.parent[root_y] += self.parent[root_x] +            self.parent[root_x] = root_y +        return True +n, m = list(map(int, input().split())) +ab = [list(map(int, input().split())) for i in range(m)] -# Mの辺を消して、わ～シャルフロイド -    b = [i[::] for i in a] -    x1, x2 = hen_m[i] -    b[x1][x2] = False -    b[x2][x1] = False -    warshall(n, b) -    flag = 0 -    for j in range(n - 1): -        for k in range(j + 1, n): -            if not b[j][k]: -                flag = 1 -                break -        if flag == 1: -            break -    # print(i, flag) -    ans += flag +    UF = UnionFind(n) +    use = ab[::] +    use.pop(i) +    for a, b in use: +        UF.union(a - 1, b - 1) +    if sum([j < 0 for j in UF.parent]) - 1: +        ans += 1