N,M = map(int,input().split()) G = [[] for _ in range(N)] for _ in range(M): u,v = map(int,input().split()) G[u-1].append(v-1) G[v-1].append(u-1) memo = [0] * N memo[0] = 1 stack = [0] even = 0 odd = 1 ans = 1 for i in range(N): next = [] while stack: now = stack.pop() for v in G[now]: if memo[v] == 0: next.append(v) memo[v] = 1 if i % 2 == 0: even += 1 else: odd += 1 if i % 2 == 0: ans = ans + even - odd else: ans = ans - even + odd print(ans) stack = next