One day n students come to the stadium. They want to play football, and for that they need to split into teams, the teams must have an equal number of people.

We know that this group of people has archenemies. Each student has at most two archenemies. Besides, if student A is an archenemy to student B, then student B is an archenemy to student A.

The students want to split so as no two archenemies were in one team. If splitting in the required manner is impossible, some students will have to sit on the bench.

Determine the minimum number of students you will have to send to the bench in order to form the two teams in the described manner and begin the game at last.

Input

The first line contains two integers n and m (2 ≤ n ≤ 100, 1 ≤ m ≤ 100) — the number of students and the number of pairs of archenemies correspondingly.

Next m lines describe enmity between students. Each enmity is described as two numbers ai and bi (1 ≤ ai, bi ≤ n, ai ≠ bi) — the indexes of the students who are enemies to each other. Each enmity occurs in the list exactly once. It is guaranteed that each student has no more than two archenemies.

You can consider the students indexed in some manner with distinct integers from 1 to n.

Output

Print a single integer — the minimum number of students you will have to send to the bench in order to start the game.

Examples

Input

5 4
1 2
2 4
5 3
1 4


Output

1

Input

6 2
1 4
3 4


Output

0

Input

6 6
1 2
2 3
3 1
4 5
5 6
6 4


Output

2
import sys


##############################################
class Graph:
    def __init__(self,pairs,n):
        self.g  = []
        self.sizes = []
        for _ in range(n+1):
            self.g.append([0,0])
            self.sizes.append(0)
        self.n=n
        self.i=0
        for a,b in pairs:
            self.insert(a,b)
            self.insert(b,a)
        # print("(GRAPH INIT) graph start")
        
        # print("(GRAPH INIT) init finished")

    def insert(self,home,away):
        assert (self.sizes[home] in {0,1})
        if self.sizes[home]==0:
            assert (self.sizes[home]==0)
            self.g[home][0]=away
            self.sizes[home]=1
        else:
            assert (self.sizes[home]==1)
            self.g[home][1]=away
            self.sizes[home]=2
        assert (self.sizes[home] in {2,1})
    
    def find_start(self):
        while self.i<self.n:
            if self.sizes[self.i]>0:
                return self.i
            self.i+=1
        return None
        
    
    def remove(self,home,away):
        if self.g[home][0]==away:
            self.g[home][0]=self.g[home][1]
            self.g[home][1]=0
        elif self.g[home][1]==away:
            self.g[home][1]=0
        else:
            # print("ERROR (REMOVE)")
            sys.exit()
        self.sizes[home]-=1
        assert (self.sizes[home]>=0)
        

    def jump(self,home):
        if self.sizes[home]==0:
            return None
        else:
            assert (self.sizes[home] in {1,2})
            # print(f"(JUMP) home: {home}")
            # print(self.g[home])
            index = self.sizes[home]-1
            away = self.g[home][index]
            self.remove(home,away)
            self.remove(away,home)
            return away



    def find_loop(self):
        #return true if find odd length cycle
        #must return 1 if odd length cycle, None if nothing to find, 0 for chains or even length cycles
        # print('(FIND LOOP) start')
        start = self.find_start()
        # print('(FIND LOOP) found start node: ', start)
        # print('(FIND LOOP): graph')
        self.print()
        if start==None:
            return None
        result = -1


        l=1
        i=start
        loop = [start]
        while True:
            j=self.jump(i)
            if j==None:
                result = 0
                break
            l+=1
            loop.append(j)
            if j==start:
                l-=1
                if l>=3 and (not (l%2==0)):
                    result = 1
                else:
                    result = 0
                break
            i=j
        # print(f'(FIND LOOP) : loop {loop} ')






            


        if result == -1 :
            # print("ERROR (FIND LOOP)")
            sys.exit()
        else:
            return result

    def print(self):
        a=""
        b=""
        for x,y in self.g[1:]:
            a+=str(x)
            b+=str(y)
        # print(a)
        # print(b)













            









def solve(pairs,n,m):
    """
    pairs are already sorted
    algorithm:

    while still edges:
        pick a start edge
        trace it around
        if dead end:
            ignore
        if same as start edge:
            if odd length seq:
                save

    
    """

    # print('(SOLVE) started solving instance')
    g=Graph(pairs,n)
    s = 0
    while True:
        k = g.find_loop()
        # print('k=',k)
        if k==None:
            return s
        else:
            s+=k
    # print("ERROR 2")

































































##############################################















def main():
    files = sys.argv[1:]
    files = ['in.txt','in2.txt','in3.txt','in4.txt']
    ans = [1,0,2,0]

    i=0
    print("in main")
    for filen in files:
        print(f'solving problem: {i}',end=" | ")
        with open(filen) as file:
            pairs = []
            n,m = next(file).split()
            n=int(n)
            m=int(m)
            for line in file:
                a,b=line.split()
                a=int(a)
                b=int(b)
                a,b=min(a,b),max(a,b)
                pairs.append((a,b))
            x=solve(pairs,n,m)
            #correction
            if not ((n-x)%2==0):
                x+=1
            print(x,ans[i],'correct: ' ,x==ans[i])
            i+=1
        # print('\n'*10)

def real_main():
    pairs = []
    n,m = input().split()
    n=int(n)
    m=int(m)
    i = m
    for line in sys.stdin:
        line = line[:-1]
        a,b=line.split()
        a=int(a)
        b=int(b)
        a,b=min(a,b),max(a,b)
        pairs.append((a,b))
        m -=1
        if m==0:
            break
    x=solve(pairs,n,m)
    if not ((n-x)%2==0):
        x+=1
    print(x)

# main()
real_main()
