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 import sys if len(G[0]) == 0: for _ in range(N): print(0) exit() for i in range(N): nx = [] while stack: now = stack.pop() for v in G[now]: if memo[v] == 0: nx.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 = nx