func_code_string: #include <bits/stdc++.h>   using namespace std;   template <class Ta, class Tb>   inline Tb cast(Ta a) {     stringstream ss;     ss << a;     Tb b;     ss >> b;     return b;   };   const double EPS = 1e-9;   const int INF = 1000000000;   const int MOD = 1000000007;   const int diri[8] = {-1, 0, 1, 0, -1, 1, 1, -1};   const int dirj[8] = {0, 1, 0, -1, 1, 1, -1, -1};   vector<int> tree;   int root(int n) {     if (tree[n] == -1) return n;     return tree[n] = root(tree[n]);   }   int main() {     int n, m;     cin >> n >> m;     vector<int> deg(n, 0);     tree = vector<int>(n, -1);     for (int i = 0; i < m; ++i) {       int x, y;       cin >> x >> y;       --x;       --y;       ++deg[x];       ++deg[y];       int a = root(x), b = root(y);       if (a != b) {         tree[b] = a;       }     }     int c = 0;     for (int i = 0; i < n; ++i)       if (deg[i] != 0 and tree[i] == -1) ++c;     if (deg[0] == 0 and c > 0) ++c;     int s = 0;     for (int i = 0; i < n; ++i)       if (deg[i] % 2 == 1) ++s;     if (c == 1)       cout << s / 2 << endl;     else {       vector<int> v(n, 0);       for (int i = 0; i < n; ++i)         if (deg[i] % 2 == 1) v[root(i)] = 1;       int t = 0;       for (int i = 0; i < n; ++i) t += v[i];       cout << c + s / 2 - t << endl;     }   }   