class UnionFind:

  def __init__(self, num):

    self.rank = [0]*num

    self.par = [i for i in range(num)] #基準(par = parentのpar)

    self.n   = num

    self.size = [1]*num



#親を探す

  def find(self, x):

    if self.par[x] == x:

      return x

    else:

      self.par[x] = self.find(self.par[x]) #自分じゃなきゃ親を探す

      return self.par[x]



#集合を結合する(結合する前に親のポインタを取得する)

  def union(self, x, y):

    x = self.find(x)

    y = self.find(y)

    if x == y:

      return

    if self.rank[x] < self.rank[y]: #ランクの高い方に基準を合わせる

      x,y=y,x

    if self.rank[x] == self.rank[y]:

      self.rank[x] += 1

    self.par[y] = x

    self.size[x] += self.size[y]

    self.size[y] = 0



  def same(self, x, y):

    return self.find(x) == self.find(y)



  def all_find(self):

    for n in range(len(self.par)):

      self.find(n)





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

# edges=[[0]*n for i in range(n)]

# uf=UnionFind(n)

ans=0

# ab=[]

# for i in range(m):

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

#   ab.append([a,b])

#   uf.union(a-1,b-1)

# for i in range(m):

#   uf1=UnionFind(n)

#   for j in range(m):

#     a,b=ab[j]

#     if i==j:

#       continue

#     uf1.union(a-1,b-1)

#   if all([True if i==j else False for i,j in zip(uf.par,uf1.par)])!=True:

#     ans+=1

nl=[]

for i in range(m):

    f,t=list(map(int,input().split()))

    nl.append([f-1,t-1])

for i in range(m):

    uf=UnionFind(n)

    flag=False

    for j in range(m):

        if i==j:

            continue

        uf.union(nl[j][0],nl[j][1])

    nl.append(t)

    for j in range(n):

        for k in range(n):

            if not uf.same(j,k):

                flag=True

    if flag:

        ans+=1

print(ans)
class UnionFind:

  def __init__(self, num):

    self.rank = [0]*num

    self.par = [i for i in range(num)] #基準(par = parentのpar)

    self.n   = num

    self.size = [1]*num



#親を探す

  def find(self, x):

    if self.par[x] == x:

      return x

    else:

      self.par[x] = self.find(self.par[x]) #自分じゃなきゃ親を探す

      return self.par[x]



#集合を結合する(結合する前に親のポインタを取得する)

  def union(self, x, y):

    x = self.find(x)

    y = self.find(y)

    if x == y:

      return

    if self.rank[x] < self.rank[y]: #ランクの高い方に基準を合わせる

      x,y=y,x

    if self.rank[x] == self.rank[y]:

      self.rank[x] += 1

    self.par[y] = x

    self.size[x] += self.size[y]

    self.size[y] = 0



  def same(self, x, y):

    return self.find(x) == self.find(y)



  def all_find(self):

    for n in range(len(self.par)):

      self.find(n)





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

uf=UnionFind(n)

ans=0

ab=[]

for i in range(m):

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

  ab.append([a,b])

for i in range(m):

  uf=UnionFind(n)

  flag=False

  for j in range(m):

    a,b=ab[j]

    if i==j:

      continue

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

  for j in range(n):

    for k in range(j,n):

      if not uf.same(j,k):

        flag=True

  if flag:

    ans+=1



print(ans)
class UnionFind:
    def __init__(self, num):
        self.rank = [0] * num
        self.par = [i for i in range(num)]  # 基準(par = parentのpar)
        self.n = num
        self.size = [1] * num

    # 親を探す
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])  # 自分じゃなきゃ親を探す
            return self.par[x]

    # 集合を結合する(結合する前に親のポインタを取得する)
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:  # ランクの高い方に基準を合わせる
            x, y = y, x
        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1
        self.par[y] = x
        self.size[x] += self.size[y]
        self.size[y] = 0

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def all_find(self):
        for n in range(len(self.par)):
            self.find(n)


n, m = list(map(int, input().split()))
# edges=[[0]*n for i in range(n)]
# uf=UnionFind(n)
ans = 0
# ab=[]
# for i in range(m):
#   a,b=map(int,input().split())
#   ab.append([a,b])
#   uf.union(a-1,b-1)
# for i in range(m):
#   uf1=UnionFind(n)
#   for j in range(m):
#     a,b=ab[j]
#     if i==j:
#       continue
#     uf1.union(a-1,b-1)
#   if all([True if i==j else False for i,j in zip(uf.par,uf1.par)])!=True:
#     ans+=1
nl = []
for i in range(m):
    f, t = list(map(int, input().split()))
    nl.append([f - 1, t - 1])
for i in range(m):
    uf = UnionFind(n)
    flag = False
    for j in range(m):
        if i == j:
            continue
        uf.union(nl[j][0], nl[j][1])
    nl.append(t)
    for j in range(n):
        for k in range(n):
            if not uf.same(j, k):
                flag = True
    if flag:
        ans += 1
print(ans)

class UnionFind:
    def __init__(self, num):
        self.rank = [0] * num
        self.par = [i for i in range(num)]  # 基準(par = parentのpar)
        self.n = num
        self.size = [1] * num

    # 親を探す
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])  # 自分じゃなきゃ親を探す
            return self.par[x]

    # 集合を結合する(結合する前に親のポインタを取得する)
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:  # ランクの高い方に基準を合わせる
            x, y = y, x
        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1
        self.par[y] = x
        self.size[x] += self.size[y]
        self.size[y] = 0

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def all_find(self):
        for n in range(len(self.par)):
            self.find(n)


n, m = list(map(int, input().split()))
uf = UnionFind(n)
ans = 0
ab = []
for i in range(m):
    a, b = list(map(int, input().split()))
    ab.append([a, b])
for i in range(m):
    uf = UnionFind(n)
    flag = False
    for j in range(m):
        a, b = ab[j]
        if i == j:
            continue
        uf.union(a - 1, b - 1)
    for j in range(n):
        for k in range(j, n):
            if not uf.same(j, k):
                flag = True
    if flag:
        ans += 1
print(ans)

-# edges=[[0]*n for i in range(n)] -# uf=UnionFind(n) +uf = UnionFind(n) -# ab=[] -# for i in range(m): -#   a,b=map(int,input().split()) -#   ab.append([a,b]) -#   uf.union(a-1,b-1) -# for i in range(m): -#   uf1=UnionFind(n) -#   for j in range(m): -#     a,b=ab[j] -#     if i==j: -#       continue -#     uf1.union(a-1,b-1) -#   if all([True if i==j else False for i,j in zip(uf.par,uf1.par)])!=True: -#     ans+=1 -nl = [] +ab = [] -    f, t = list(map(int, input().split())) -    nl.append([f - 1, t - 1]) +    a, b = list(map(int, input().split())) +    ab.append([a, b]) +        a, b = ab[j] -        uf.union(nl[j][0], nl[j][1]) -    nl.append(t) +        uf.union(a - 1, b - 1) -        for k in range(n): +        for k in range(j, n):