#include #include using namespace std; int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); int N, M; cin >> N >> M; atcoder::dsu d(2 * N); while(M--) { int A, B; cin >> A >> B; d.merge(--A, --B); } int ans = 0; for(vector g : d.groups()) { if((int) g.size() % 2 == 1) { ans++; } } cout << ans / 2 << '\n'; return 0; }