Ant Country consist of N towns.There are M roads connecting the towns. 

Ant Tony,together with his friends,wants to go through every part of the country. 

They intend to visit every road , and every road must be visited for exact one time.However,it may be a mission impossible for only one group of people.So they are trying to divide all the people into several groups,and each may start at different town.Now tony wants to know what is the least groups of ants that needs to form to achieve their goal. 

Input

Input contains multiple cases.Test cases are separated by several blank lines. Each test case starts with two integer N(1<=N<=100000),M(0<=M<=200000),indicating that there are N towns and M roads in Ant Country.Followed by M lines,each line contains two integers a,b,(1<=a,b<=N) indicating that there is a road connecting town a and town b.No two roads will be the same,and there is no road connecting the same town.

Output

For each test case ,output the least groups that needs to form to achieve their goal.

Sample Input

3 3
1 2
2 3
1 3

4 2
1 2
3 4

Sample Output

1
2


        
  

Hint

New ~~~ Notice: if there are no road connecting one town ,tony may forget about the town.
In sample 1,tony and his friends just form one group,they can start at either town 1,2,or 3.
In sample 2,tony and his friends must form two group.

题意:有一个图(非联通)每个边只能走一遍,问你多少笔能走完

题解:对于一个联通无向图来说,如果没有奇度顶点,说明有欧拉回路,一笔就能走完

如果没有欧拉回路,笔画数=奇度顶点数/2

题目没说联不联通,所以用并查集判断一下每个连通块有多少奇度顶点

需要特别注意的是,一个顶点的连通块直接跳过,因为不需要笔画数

#include <bits/stdc++.h>
#define maxn 100000+5
using namespace std;
int  pre[maxn],cnt[maxn],d[maxn];
int vis[maxn],n,m;
int Find(int x){  
    int r=x;  
    while(r!=pre[r])  
        r=pre[r];
    int i=x,j;  
    while(pre[i]!=r){  
        j=pre[i];  
        pre[i]=r;  
        i=j;
    }  
    return r;  
}
void mix(int x,int y){  
    int fx=Find(x),fy=Find(y);
    if(fx!=fy){
        pre[fy]=fx;  
    }  
}
void init(){
    for(int i=0;i<=n;i++)pre[i]=i;
    memset(cnt,0,sizeof(cnt));
    memset(d,0,sizeof(d));
    memset(vis,0,sizeof(vis));
}

int main()
{
    while(scanf("%d%d",&n,&m)!=EOF){
        init();
        for(int i=0;i<m;i++){
            int u,v;
            scanf("%d%d",&u,&v);
            d[u]++,d[v]++;
            if(Find(u)!=Find(v))mix(u,v);
        }
        vector<int>v;
        for(int i=1;i<=n;i++){ 
            int k=Find(i);
            if(d[i]%2==1)cnt[k]++;
            vis[k]++;
        }
        int ans=0;
        for(int i=1;i<=n;i++){
            if(vis[i]>1){
                if(cnt[i])ans+=cnt[i]/2;
                else  ans++;
            }
        }
        printf("%d\n",ans);
    }   
    return 0;
}