#include <bits/stdc++.h>
using namespace std;
struct point {
  int i, d;
  inline bool operator<(const point t) const {
    if (d != t.d)
      return d < t.d;
    else
      return i < t.i;
  }
};
set<point> S;
set<pair<int, int> > T[1200000];
set<pair<int, int> >::iterator it;
map<int, int> M[1200000];
vector<pair<int, int> > E;
vector<pair<int, int> >::iterator Eit;
int b[1200000], d[1200000], r[1200000];
int i, m, n, t, x, y;
inline int fastscanf() {
  int t = 0;
  char c = getchar();
  while (!((c > 47) && (c < 58))) c = getchar();
  while ((c > 47) && (c < 58)) t = t * 10 + c - 48, c = getchar();
  return t;
}
inline void fastprintf(int x) {
  char c[8];
  c[0] = 0;
  for (; x > 0; x = x / 10) c[0]++, c[c[0]] = x % 10;
  for (; c[0] > 0; c[0]--) putchar(c[c[0]] + 48);
  return;
}
int main() {
  srand((int)time(0));
  n = fastscanf(), m = fastscanf();
  if (!m) return puts("0"), 0;
  for (i = 1; i <= m; i++) {
    x = fastscanf(), y = fastscanf();
    M[x][y] = rand() << 15 | rand();
    M[y][x] = rand() << 15 | rand();
    T[x].insert(make_pair(M[x][y], y));
    T[y].insert(make_pair(M[y][x], x));
    d[x]++, d[y]++;
  }
  for (i = 1; i <= n; i++) {
    r[i] = (d[i] + 1) / 2;
    S.insert((point){i, d[i]});
  }
  while (!S.empty()) {
    t = (*S.begin()).i;
    S.erase(S.begin());
    b[t] = 1;
    x = E.size();
    for (it = T[t].begin(); it != T[t].end(); it++) {
      y = (*it).second;
      if (!b[y]) {
        S.erase(S.find((point){y, d[y]}));
        d[y]--;
        S.insert((point){y, d[y]});
        if ((r[t]) && (r[y])) {
          r[t]--, r[y]--;
          E.push_back(make_pair(t, y));
        }
      }
    }
    for (i = x; i < E.size(); i++)
      T[E[i].first].erase(make_pair(M[E[i].first][E[i].second], E[i].second)),
          T[E[i].second].erase(
              make_pair(M[E[i].second][E[i].first], E[i].first));
    y = E.size();
    for (it = T[t].begin(); (r[t]) && (it != T[t].end()); it++)
      if (!r[(*it).second]) r[t]--, E.push_back(make_pair(t, (*it).second));
    for (i = y; i < E.size(); i++)
      T[E[i].first].erase(make_pair(M[E[i].first][E[i].second], E[i].second)),
          T[E[i].second].erase(
              make_pair(M[E[i].second][E[i].first], E[i].first));
  }
  fastprintf(E.size()), puts("");
  for (Eit = E.begin(); Eit != E.end(); Eit++)
    fastprintf((*Eit).first), putchar(' '), fastprintf((*Eit).second), puts("");
  return 0;
}
