#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int n, m;
vector<int> EMD[N];
int U[N], V[N];
int deg[N];
void input() {
  scanf("%d %d", &n, &m);
  int u, v;
  for (int e = (1); e <= (m); e++) {
    scanf("%d %d", &u, &v);
    U[e] = u;
    V[e] = v;
    deg[u]++;
    deg[v]++;
  }
}
bool deleted[N];
int cur, total;
void deleteEdge(int e) {
  deleted[e] = true;
  cur++;
  deg[U[e]]--;
  deg[V[e]]--;
}
void solve() {
  srand(time(NULL));
  for (int u = (1); u <= (n); u++) {
    deg[u] /= 2;
  }
  for (int e = (1); e <= (m); e++) {
    EMD[min(deg[U[e]], deg[V[e]])].push_back(e);
  }
  cur = 0, total = m - min(m, (n + m) / 2);
  for (int d = (m); d >= (1); d--) {
    if (cur == total) {
      break;
    }
    for (int e : EMD[d]) {
      if (cur == total) {
        break;
      }
      int md = min(deg[U[e]], deg[V[e]]);
      if (md == d || (md > 0 and rand() % 5 == 0)) {
        deleteEdge(e);
      } else if (md > 0) {
        EMD[md].push_back(e);
      }
    }
  }
}
void output() {
  printf("%d\n", m - total);
  for (int e = (1); e <= (m); e++) {
    if (!deleted[e]) {
      printf("%d %d\n", U[e], V[e]);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  {
    input();
    solve();
    output();
  }
  return 0;
}
