#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int INF = 1000000000;
vector<vector<int> > g;
int n, m;
int cap[1024000];
bool u[1024000];
vector<int> p;
void dfs(int v) {
  if (u[v]) return;
  u[v] = true;
  if (g[v].size() % 2) cap[v] = 1;
  for (int i = 0; i < g[v].size(); ++i) {
    int next = g[v][i];
    if (!u[next]) {
      dfs(next);
      cap[v] += cap[next];
    }
  }
}
int main() {
  cin >> n >> m;
  g.resize(n);
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 0; i < n; ++i)
    if (!u[i]) {
      if (i && (long long)(g[i]).size() == 0) continue;
      dfs(i);
      p.push_back(cap[i]);
    }
  int res = 0;
  if (p.size() == 1)
    res = p[0] / 2;
  else {
    for (int i = 0; i < (long long)(p).size(); ++i) {
      res += max(2, p[i]);
    }
    res /= 2;
  }
  cout << res << endl;
}
