#include <set>
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <limits>
#include <map>
#include <numeric>

#define ll long long
using namespace std;
static ll imin = std::numeric_limits<ll>::min();
static ll imax = std::numeric_limits<ll>::max();
#define rep(i, n) for(int i = 0; (i)<(n); ++(i))
#define rep1(i, n) for(int i = 1; (i)<(n); ++(i))
#define rev_rep(i, n) for(int i = (n) - 1; (i) >= 0; --(i))
#define range(a, i, b) for(int i = (a); (i) < (b); ++(i))
#define dump(x) cout << #x << ":" << x << "\n";
#define all(v) v.begin(), v.end()
#define readl(N) ll N; cin >> N
#define readlv(N, vec) vector<ll> vec(N); rep(i, N){cin >> vec[i];}
#define greater_than [](ll l, ll r){return l > r;}
template<class T1, class T2>
std::ostream& operator << (std::ostream& os, std::map<T1, T2>& mp);
template<class T1, class T2>
std::ostream& operator << (std::ostream& os, std::pair<T1, T2>& pair);
template<class T>
std::ostream& operator << (std::ostream& os, std::vector<T>& vec);
template<class T1, class T2>
std::ostream& operator << (std::ostream& os, std::pair<T1, T2>& pair){
  os << '(' << pair.first << ',' << pair.second << ')';
  return os;
}

template<class T>
std::ostream& operator << (std::ostream& os, std::vector<T>& vec){
  std::size_t n = vec.size();
  if(n == 0){
    return os;
  }
  os << " ";
  for(ll i = 0; i<n - 1; ++i){
    os << vec[i] << " ";
  }
  os << vec[n - 1];
  os << std::endl;
  return os;
}

template<class T1, class T2>
std::ostream& operator << (std::ostream& os, std::map<T1, T2>& mp){
  std::size_t n = mp.size();
  if(n == 0){
    return os;
  }
  os << " ";
  for(auto && x:mp){
    os << x << " ";
  }
  os << std::endl;
  return os;
}

template<class T>
std::ostream& operator << (std::ostream& os, std::set<T>& mp){
  std::size_t n = mp.size();
  if(n == 0){
    return os;
  }
  os << " ";
  for(auto && x:mp){
    os << x << " ";
  }
  os << std::endl;
  return os;
}

template<class T> inline bool chmin(T& a, T const b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T const b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

ll fact(ll n){
  ll res=1;
  while(n>=0){
    res*=n;
    n--;
  }
  return res;
}
    
ll pow(ll i, ll n){
  ll res=1;
  while(n>=0){
    res*=i;
    n--;
  }
  return res;
}

vector<vector<bool>> graph;
vector<ll> visited(50);
ll N, M;

void dfs(ll v){
  visited[v]=true;
  for (int v2 = 0; v2 < N; v2++) {
    if(graph[v][v2]==false) continue;
    if(visited[v2]==true) continue;
    dfs(v2);
  }
}


int main(){
  cin>>N>>M;
  vector<ll> a(M),b(M);
  graph=vector<vector<bool>>(N, vector<bool>(N, false));
  
  rep(i,M){
    ll f,t;
    cin >> f >> t;
    a[i]=f-1;
    b[i]=t-1;
    graph[f-1][t-1]=graph[t-1][f-1]=true;
  }
  //dump(graph);
  ll res=0;
  
  for (int i = 0; i < M; i++) {
    graph[a[i]][b[i]]=graph[b[i]][a[i]]=false;
    for (int j = 0; j < N; j++) visited[j]=false;
    dfs(0);

    bool bridge=false;
    for (int j = 0; j < N; j++) if(visited[j]==false)bridge=true;
    if(bridge)res++;

    graph[a[i]][b[i]]=graph[b[i]][a[i]]=true;

  }

  cout<<res<<endl;
  return 0;
}
//#ifndef BOOST_TEST_MAIN
//int main(int const argc, char const** argv){
//  readl(l);
//  ll rank = 1;
//  ll nodes=0;
//  while(rank <= l){
//    rank *= 2;
//    nodes++;
//  }
//  vector<vector<ll>> arrs;
//  ll len=1;
//  rep1(i,nodes){
//    arrs.push_back({i, i+1, len});
//    arrs.push_back({i, i+1, 0});
//    len*=2;
//  }
//
//  rev_rep(i,nodes){
//    if((l & (1<<(i)))){
//      //dump(i);
//      //dump(l);
//      arrs.push_back({i+1,nodes+1,l-(1<<i)});
//      l -= 1<<i;
//    }
//
//  }
//  cout<<nodes<<" " << arrs.size()<<endl;
//  cout<<arrs<<endl;
//}
//#endif


Measured memory_bytes: 256