#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 17;
int n, m, deg[maxn], cdeg[maxn], per[maxn];
vector<int> g[maxn];
bool del[maxn];
pair<int, int> edge[maxn];
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
bool ok(int v) { return cdeg[v] - 1 >= (deg[v] + 1) / 2; }
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    v--, u--;
    edge[i] = {v, u};
    deg[v]++, deg[u]++;
  }
  iota(per, per + m, 0);
  do {
    shuffle(per, per + m, rng);
    copy(deg, deg + n, cdeg);
    memset(del, 0, sizeof del);
    for_each(per, per + m, [](int e) {
      if (!del[e] && ok(edge[e].first) && ok(edge[e].second)) {
        del[e] = 1;
        cdeg[edge[e].first]--;
        cdeg[edge[e].second]--;
      }
    });
  } while (count(del, del + m, 0) > (n + m + 1) / 2);
  cout << count(del, del + m, 0) << '\n';
  for (int i = 0; i < m; i++)
    if (!del[i]) cout << edge[i].first + 1 << ' ' << edge[i].second + 1 << '\n';
}
