Vasya went for a walk in the park. The park has n glades, numbered from 1 to n. There are m trails between the glades. The trails are numbered from 1 to m, where the i-th trail connects glades xi and yi. The numbers of the connected glades may be the same (xi = yi), which means that a trail connects a glade to itself. Also, two glades may have several non-intersecting trails between them.

Vasya is on glade 1, he wants to walk on all trails of the park exactly once, so that he can eventually return to glade 1. Unfortunately, Vasya does not know whether this walk is possible or not. Help Vasya, determine whether the walk is possible or not. If such walk is impossible, find the minimum number of trails the authorities need to add to the park in order to make the described walk possible.

Vasya can shift from one trail to another one only on glades. He can move on the trails in both directions. If Vasya started going on the trail that connects glades a and b, from glade a, then he must finish this trail on glade b.

Input

The first line contains two integers n and m (1 ≤ n ≤ 106; 0 ≤ m ≤ 106) — the number of glades in the park and the number of trails in the park, respectively. Next m lines specify the trails. The i-th line specifies the i-th trail as two space-separated numbers, xi, yi (1 ≤ xi, yi ≤ n) — the numbers of the glades connected by this trail.

Output

Print the single integer — the answer to the problem. If Vasya's walk is possible without adding extra trails, print 0, otherwise print the minimum number of trails the authorities need to add to the park in order to make Vasya's walk possible. 

Examples

Input

3 3
1 2
2 3
3 1


Output

0


Input

2 5
1 1
1 2
1 2
2 2
1 2


Output

1

Note

In the first test case the described walk is possible without building extra trails. For example, let's first go on the first trail, then on the second one, and finally on the third one.

In the second test case the described walk is impossible without adding extra trails. To make the walk possible, it is enough to add one trail, for example, between glades number one and two.
#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
int n, m, cnt;
int deg[1000000 + 7];
bool visit[1000000 + 7];
vector<int> edges[1000000 + 7];
vector<int> odd;
void reset() {
  int i, lim = n + 2;
  for (i = 0; i < lim; i++) {
    edges[i].clear();
    visit[i] = deg[i] = 0;
  }
  odd.clear();
}
int dfs(int u) {
  int sz, v, ret = 0, i, j;
  sz = edges[u].size();
  cnt++;
  for (i = 0; i < sz; i++) {
    v = edges[u][i];
    if (!visit[v]) {
      visit[v] = 1;
      ret += dfs(v);
    }
  }
  return ret + (deg[u] % 2);
}
int main() {
  int u, v, ans, sz, cur, ret, i, j, k;
  while (scanf("%d %d", &n, &m) == 2) {
    reset();
    ans = 0;
    for (i = 0; i < m; i++) {
      scanf("%d %d", &u, &v);
      edges[u].push_back(v);
      edges[v].push_back(u);
      deg[u]++;
      deg[v]++;
    }
    visit[1] = 1;
    odd.push_back(dfs(1));
    for (i = 2; i <= n; i++) {
      if (!visit[i]) {
        visit[i] = 1;
        if (edges[i].size() == 0) continue;
        ret = dfs(i);
        odd.push_back(ret);
      }
    }
    sz = odd.size();
    if (sz) {
      cur = odd[0];
      for (i = 1; i < sz; i++) {
        if (cur == odd[i] and cur == 0) {
          cur += 2;
          ans++;
        } else if (cur and odd[i]) {
          cur += odd[i];
          cur -= 2;
          ans++;
        } else if (cur == 0 and odd[i]) {
          cur += odd[i];
          ans++;
        } else if (odd[i] == 0 and cur) {
          ans++;
        }
      }
      ans += (cur / 2);
    }
    printf("%d\n", ans);
  }
  return 0;
}
