output_description: Print the number of the edges that are bridges among the M edges.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M  
      a_1 b_1  
      a_2 b_2
      :  
      a_M b_M
attempt: 
  #pragma GCC optimize("O3")
  #include <bits/stdc++.h>
  #define ll long long
  #define rep2(i,a,b) for(ll i=a;i<=b;++i)
  #define rep(i,n) for(ll i=0;i<n;i++)
  #define rep3(i,a,b) for(ll i=a;i>=b;i--)
  #define pii pair<int,int>
  #define pll pair<ll,ll>
  #define pq priority_queue
  #define pb push_back
  #define eb emplace_back
  #define veci vector<int>
  #define vecll vector<ll>
  #define vecpii vector<pii>
  #define vec2(a,b) vector<vec>(a,vec(b))
  #define vec2ll(a,b) vector<vec>(a,vecll(b))
  #define vec3(a,b,c) vector<vector<vec>>(a,vec2(b,c))
  #define vec3ll(a,b,c) vector<vector<vecll>>(a,vec2ll(b,c))
  #define fi first
  #define se second
  #define all(c) begin(c),end(c)
  #define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
  #define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
  #define ub(c,x) distance(c.begin(),upper_bound(all(c),x))
  
  
  using namespace std;
  int in() {int x;cin>>x;return x;}
  ll lin() {ll x;cin>>x;return x;}
  template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
  template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
  template<class T> inline void print(pair<T,T> p){cout<<"("<<p.first<<","<<p.second<<") ";}
  //template<class T> inline void print(vector<pair<T,T>> v){for(auto e:v)print(e); cout<<endl;}
  //template<class T> inline void print(T v){for(auto e:v)cout<<e<<" ";cout<<endl;}
  template<typename T>
  istream& operator >> (istream& is, vector<T>& vec){
      for(T& x:vec) is >> x;
      return is;
  }
  const ll INF=1e10+100;
  
  class DisjointSet{
      public:
      vector<ll> rank,p;
      DisjointSet(){}
      DisjointSet(ll size){
          rank.resize(size,0);
          p.resize(size,0);
          rep(i,size){
              makeSet(i);
          }
      }
      void makeSet(ll x){
          p[x]=x;
          rank[x]=0;
      }
      bool same(ll x,ll y){
          return findSet(x)==findSet(y);
      }
      void unite(ll x,ll y){
          link(findSet(x),findSet(y));
      }
      void link(ll x, ll y){
          if(rank[x]>rank[y]){
              p[y]=x;
          }
          else{
              p[x]=y;
              if(rank[x]==rank[y]){
                  rank[y]++;
              }
          }
      }
      ll findSet(ll x){
          if(p[x]!=x){
              p[x]=findSet(p[x]);
          }
          return p[x];
      }
  };
  
  int main()
  {
      ll n,m;
      cin >> n >> m;
      vector<ll> a(m);
      vector<ll> b(m);
      rep(i,m){
          ll s,t;
          cin >> s >> t;
          s--;
          t--;
          a[i]=s;
          b[i]=t;
      }
      ll ans=0;
      rep(i,m){ //i番目の辺を使わない
          DisjointSet dis=DisjointSet(n);
          bool flag=true; //trueならばグラフは連結
          rep(j,m){
              if(j==i) continue;
              dis.unite(a[j],b[j]);
          }
          rep(p,n){
              for(ll q=p+1;q<n;q++){
                  if(!dis.same(p,q)){
                      flag=false;
                      break;
                  }
              }
          }
          if(!flag) ans++;
      }
      cout << ans << endl;
      return 0;
  } 
problem_description: Statement
  
  You are given an undirected connected graph with N vertices and M edges that
  does not contain self-loops and double edges.  
  The i-th edge (1 \leq i \leq M) connects Vertex a_i and Vertex b_i.
  
  An edge whose removal disconnects the graph is called a _bridge_.  
  Find the number of the edges that are bridges among the M edges.
samples: [{"input": "7 7\n    1 3\n    2 7\n    3 4\n    4 5\n    4 6\n    5 6\n    6 7", "output": "4\n    \n\nThe figure below shows the given graph:\n\n![570677a9809fd7a5b63bff11e5d9bf79.png](https://img.atcoder.jp/abc075/570677a9809fd7a5b63bff11e5d9bf79.png)\n\nThe edges shown in red are bridges. There are four of them.\n\n* * *"}, {"input": "3 3\n    1 2\n    1 3\n    2 3", "output": "0\n    \n\nIt is possible that there is no bridge.\n\n* * *"}, {"input": "6 5\n    1 2\n    2 3\n    3 4\n    4 5\n    5 6", "output": "5\n    \n\nIt is possible that every edge is a bridge."}]