import copy

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

AB = [[int(_) - 1 for _ in input().split()] for _ in range(M)]



G = [[0] * N for _ in range(N)]

for ab in AB:

    G[ab[0]][ab[1]] = 1

    G[ab[1]][ab[0]] = 1





def dfs(Gn, a, x):

    a[x] = 1

    for i in range(N):

        if Gn[x][i] == 1 and a[i] == 0:

            a[i] = 1

            dfs(Gn, a, i)





count = 0

for i in range(N - 1):

    for j in range(i + 1, N):

        if G[i][j] == 1:

            Gn = copy.deepcopy(G)

            Gn[i][j] = 0

            Gn[j][i] = 0

            flag = False

            for k in range(N):

                a = [0] * N

                dfs(Gn, a, k)

                if all(a):

                    flag = True

                    break

            if not flag:

                count += 1

print(count)

import copy

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

AB = [[int(_) - 1 for _ in input().split()] for _ in range(M)]



G = [set() for _ in range(N)]

a = set()

for ab in AB:

    G[ab[0]].add(ab[1])





def find(a, x):

    if a[x] != x:

        a[x] = find(a, a[x])

    return a[x]





def unite(a, x, y):

    x = find(a, x)

    y = find(a, y)

    if x != y:

        a[x] = min(x, y)

        a[y] = a[x]





ans = 0

for i in range(N - 1):

    for j in range(i + 1, N):

        if j in G[i]:

            Gn = copy.deepcopy(G)

            Gn[i].discard(j)

            a = [i for i in range(N)]

            for k in range(N - 1):

                for l in Gn[k]:

                    unite(a, k, l)

            par = set()

            for k in range(N):

                par.add(find(a, k))

            if len(par) > 1:

                ans += 1

print(ans)

import copy

N, M = [int(_) for _ in input().split()]
AB = [[int(_) - 1 for _ in input().split()] for _ in range(M)]
G = [[0] * N for _ in range(N)]
for ab in AB:
    G[ab[0]][ab[1]] = 1
    G[ab[1]][ab[0]] = 1


def dfs(Gn, a, x):
    a[x] = 1
    for i in range(N):
        if Gn[x][i] == 1 and a[i] == 0:
            a[i] = 1
            dfs(Gn, a, i)


count = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        if G[i][j] == 1:
            Gn = copy.deepcopy(G)
            Gn[i][j] = 0
            Gn[j][i] = 0
            flag = False
            for k in range(N):
                a = [0] * N
                dfs(Gn, a, k)
                if all(a):
                    flag = True
                    break
            if not flag:
                count += 1
print(count)

import copy

N, M = [int(_) for _ in input().split()]
AB = [[int(_) - 1 for _ in input().split()] for _ in range(M)]
G = [set() for _ in range(N)]
a = set()
for ab in AB:
    G[ab[0]].add(ab[1])


def find(a, x):
    if a[x] != x:
        a[x] = find(a, a[x])
    return a[x]


def unite(a, x, y):
    x = find(a, x)
    y = find(a, y)
    if x != y:
        a[x] = min(x, y)
        a[y] = a[x]


ans = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        if j in G[i]:
            Gn = copy.deepcopy(G)
            Gn[i].discard(j)
            a = [i for i in range(N)]
            for k in range(N - 1):
                for l in Gn[k]:
                    unite(a, k, l)
            par = set()
            for k in range(N):
                par.add(find(a, k))
            if len(par) > 1:
                ans += 1
print(ans)

-G = [[0] * N for _ in range(N)] +G = [set() for _ in range(N)] +a = set() -    G[ab[0]][ab[1]] = 1 -    G[ab[1]][ab[0]] = 1 +    G[ab[0]].add(ab[1]) -def dfs(Gn, a, x): -    a[x] = 1 -    for i in range(N): -        if Gn[x][i] == 1 and a[i] == 0: -            a[i] = 1 -            dfs(Gn, a, i) +def find(a, x): +    if a[x] != x: +        a[x] = find(a, a[x]) +    return a[x] -count = 0 +def unite(a, x, y): +    x = find(a, x) +    y = find(a, y) +    if x != y: +        a[x] = min(x, y) +        a[y] = a[x] + + +ans = 0 -        if G[i][j] == 1: +        if j in G[i]: -            Gn[i][j] = 0 -            Gn[j][i] = 0 -            flag = False +            Gn[i].discard(j) +            a = [i for i in range(N)] +            for k in range(N - 1): +                for l in Gn[k]: +                    unite(a, k, l) +            par = set() -                a = [0] * N -                dfs(Gn, a, k) -                if all(a): -                    flag = True -                    break -            if not flag: -                count += 1 -print(count) +                par.add(find(a, k)) +            if len(par) > 1: +                ans += 1 +print(ans)