#pragma comment(linker, "/STACK:102400000,102400000")
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <string>
#include <vector>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
#define Key_Value ch[ch[root][1]][0]
#define DBN1(a)           cerr<<#a<<"="<<(a)<<"\n"
#define DBN2(a,b)         cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define DBN3(a,b,c)       cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define DBN4(a,b,c,d)     cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define DBN5(a,b,c,d,e)   cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define DBN6(a,b,c,d,e,f) cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define clr(a,x) memset(a,x,sizeof(a))
using namespace std;
typedef long long ll;
const int maxn=500000+5;
const ll INF=2e20;
const int P=1000000007;
const double PI=acos(-1.0);
template<typename T>
inline T read(T&x){
    x=0;int _f=0;char ch=getchar();
    while(ch<'0'||ch>'9')_f|=(ch=='-'),ch=getchar();
    while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();
    return x=_f?-x:x;
}
/*struct Point{
    ll x,y;
    void read(){
        scanf("%lld%lld",&x,&y);
    }
    bool operator<(const Point&rhs) const{
        if (x==rhs.x) return y<rhs.y;
        return x<rhs.x;
    }
}p[100];
int n,k;
int main(){
    read(n),read(k);
    for (int i=1;i<=n;i++) p[i].read();
    sort(p+1,p+1+n);
    ll ans=INF;
    for (int i=1;i<=n;i++){
        for (int j=1;j<=n;j++)if (i!=j){
            int cnt=0;
            for (int k=1;k<=n;k++){
                if (p[k].x>=min(p[i].x,p[j].x) && p[k].x<=max(p[i].x,p[j].x)
                    && p[k].y>=min(p[i].y,p[j].y) && p[k].y<=max(p[i].y,p[j].y)){
                        cnt++;
                    }
            }
            if (cnt>=k){
                ans=min(ans,(max(p[i].x,p[j].x)-min(p[i].x,p[j].x))*(max(p[i].y,p[j].y)-min(p[i].y,p[j].y)));
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}*/
/*int a,b,c;
int main(){
    read(a),read(b),read(c);
    if (a==b) cout<<c<<endl;
    else if (a==c) cout<<b<<endl;
    else cout<<a<<endl;
    return 0;
}*/
/*int h,w;
int dir_x[]={0,1,0,-1,-1,-1,1,1};
int dir_y[]={1,0,-1,0,-1,1,-1,1};
char maze[55][55];
int main(){
    read(h),read(w);
    for (int i=0;i<h;i++){
        scanf("%s",maze[i]);
        for (int j=0;j<w;j++){
            if (maze[i][j]=='.') maze[i][j]='0';
        }
    }
    for (int i=0;i<h;i++){
        for (int j=0;j<w;j++){
            if (maze[i][j]=='#'){
                for (int k=0;k<8;k++){
                    int tx=i+dir_x[k];
                    int ty=j+dir_y[k];
                    if (tx<0 || tx>=h || ty<0 || ty>=w || maze[tx][ty]=='#') continue;
                    maze[tx][ty]++;
                }
            }
        }
    }
    for (int i=0;i<h;i++) puts(maze[i]);
    return 0;
}*/
int n,m,u,v,dfs_clock,pre[55],low[55],cnt;
vector<int>G[55];
int dfs(int u,int f){
    int lowu=pre[u]=++dfs_clock;
    for (int i=0;i<(int)G[u].size();i++){
        int v=G[u][i];
        if (!pre[v]){
            int lowv=dfs(v,u);
            lowu=min(lowu,lowv);
            if (lowv>pre[u]) ++cnt;
        }
        else if (pre[v]<pre[u] && v!=f) lowu=min(lowu,pre[v]);
    }
    return low[u]=lowu;
}
int main(){
    read(n),read(m);
    for (int i=1;i<=m;i++){
        int u,v;read(u),read(v);
        G[u].push_back(v);
        G[v].push_back(u);
    }
    for (int i=1;i<=n;i++) if (!pre[i]) dfs(i,-1);
    cout<<cnt<<endl;
    return 0;
}


Measured memory_bytes: 256