#include <bits/stdc++.h>
using namespace std;
long long int INF = 1e12;
long long int n, m, i, a, b, maxx, ff = 0, flag = 0;
vector<long long int> adj[1000001];
vector<long long int> fi(1000001, 0);
vector<long long int> brr(1000001, 0);
unordered_map<string, long long int> hM;
vector<pair<long long int, long long int> > res;
void removeEdges(long long int i) {
  hM.clear();
  res.clear();
  fi = brr;
  long long int cnt = 0;
  for (; cnt < n;) {
    if (fi[i] > 0) {
      for (auto j = adj[i].begin(); j != adj[i].end() && fi[i] > 0; j++) {
        if (fi[*j] != 0 && hM[to_string(i) + to_string(*j)] != *j &&
            hM[to_string(*j) + to_string(i)] != i) {
          fi[i]--;
          fi[*j]--;
          hM[to_string(*j) + to_string(i)] = i;
          hM[to_string(i) + to_string(*j)] = *j;
          res.push_back({i, *j});
        }
      }
    }
    if (fi[i] > 0) {
      if (fi[i] > 0) {
        for (auto j = adj[i].begin(); j != adj[i].end() && fi[i] > 0; j++) {
          if (hM[to_string(i) + to_string(*j)] != *j &&
              hM[to_string(*j) + to_string(i)] != i) {
            fi[i]--;
            fi[*j]--;
            hM[to_string(*j) + to_string(i)] = i;
            hM[to_string(i) + to_string(*j)] = *j;
            res.push_back({i, *j});
          }
        }
      }
    }
    if (i == 1 && ff == 1) i = 600002;
    cnt++;
    if (flag == 0)
      i++;
    else
      i--;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  maxx = ceil((n + m) / 2.0);
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
    brr[a]++;
    fi[a] = ceil(brr[a] / 2.0);
    brr[b]++;
    fi[b] = ceil(brr[b] / 2.0);
  }
  brr.clear();
  brr = fi;
  removeEdges(1);
  flag = 1;
  if (n != 600001 && maxx < res.size()) {
    removeEdges(n);
  }
  if (maxx < res.size()) {
    ff = 1;
    removeEdges(300000);
  }
  cout << res.size() << "\n";
  for (auto i = res.begin(); i != res.end(); i++) {
    cout << i->first << " " << i->second << "\n";
  }
  return 0;
}
